I can't get debugging to work in Project Builder.

If the debugger seems to do nothing when you start debugging, and you have the Dec. 2002 Developer Tools installed, you've probably hit a known bug gdb introduced in this version of the developer tools. To get around this bug, the SDL framework must reside in YourApp.app/Contents/Frameworks/

Here are two workarounds, pick which one you like best (the second one is the better choice, IMHO).

First Method: Create a "Copy Files" build phase. Here's how:

  1. Drag "SDL.framework" from the Finder into your project
  2. Go to the target settings (command-option-e).
  3. Control-click on the Build Phases and select "New Build Phase->New Copy Files Build Phase".

  4. For "Where" enter "Frameworks"
  5. For "Files:" drag the framework from the Groups & Files pane to the text box

Second Method: Create a "Shell Script" build phase.

  1. Go to the target settings (command-option-e).
  2. Control-click on the Build Phases and select "New Build Phase->New Shell Script Build Phase".

  3. Enter this script:

mkdir -p "$DST"
/Developer/Tools/CpMac -r ~/Library/Frameworks/SDL.framework "$DST"

While you're at it, also remember to turn on debugging symbols and turn down the optimization level (0 is best for debugging). You will need to clean and rebuild the project for this to take effect.

FAQ_MacOS_X_Project_Builder_Debugger (last edited 2008-04-17 08:18:39 by localhost)