[Openmcl-devel] Debugging Carbon applications

David Steuber david at david-steuber.com
Fri Jan 28 11:57:46 PST 2005


On Jan 28, 2005, at 5:14 AM, Gary Byers wrote:

> On Thu, 27 Jan 2005, Clayton Wheeler wrote:
>
>> Apple recently posted Tech Note 2124: Mac OS X Debugging Magic; about
>> fifteen seconds into reading it, I said to myself "wow, this would 
>> have
>> saved me a few weeks when I was writing Carbon and Apple Event stuff 
>> in
>> OpenMCL..."
>>
>> It is here:
>> http://developer.apple.com/technotes/tn2004/tn2124.html

Thanks for the link, Clayton.

> One other Fun Fact that I didn't see mentioned in that TN:
>
> If you "launch" a bundled OSX application (either by double-clicking
> it or by using the "open" command in the shell), the program will
> run with its standard ouput and error (file descriptors 1 and 2)
> redirected to the console log (/dev/console; the Console application
> provides a convenient way to view this output) and with file descriptor
> 0 redirected to /dev/null.

This is how I'm launching my application (and is also why I was 
interested in how to find the CDB files).  It was blind luck that I 
choose the .log extension for my debug output file so that Console.app 
would get started when I double clicked it.  A bit of additional luck 
was involved spotting the console.log window with familiar looking 
OpenMCL output.  And just above that was a failure to find a .nib file 
that I had deliberately misspelled to test my error checking.

Now If I can just figure out what I did wrong to find the CDB files 
from the application bundle, I can do development from SLIME using M-x 
slime-connect and actually modifying a running Carbon application.  I 
hope.

Using C style compile and test makes me appreciate the speed of the 
OpenMCL compiler :-)




More information about the Openmcl-devel mailing list