Sunday, February 11, 2007

A simple ~/.gdbinit file

I have a one line .gdbinit file containing:

 fb -[NSException raise] 

This is executed each time gdb (the Xcode debugger) is started. With this the code will break into the debugger whenever an exception is raised by a Cocoa program.

fb is "forward break" which unlike plain b, or "break", will set a breakpoint on code that hasn't been loaded yet.

No comments: