Search code examples
debuggingxcode4breakpoints

How do I set the default breakpoint scope in XCode 4.x?


Breakpoints in XCode 4 can be scoped by project, workspace, or user (which are shared generally between all open projects). I'm often debugging between multiple projects, so "User" scoped breakpoints is essentially all I need, ever. Is there a way to set the default scope for bp's in XCode 4? Any way other than manually changing EVERY one to User?


Solution

  • Just to answer my own question, in Xcode 4.x there seems to be no way to do this behavior by default. The best workflow for managing breakpoints between multiple xcodeproj's is to:

    • Create a workspace
    • Add all related xcodeproj's to the workspace

    Breakpoints will be scoped to the workspace for these projects, so they will be shared across any execution contexts launching from or attached to via this workspace.

    Notably, workspaces need not have any important organizational meaning - I often have a temp workspace I add and remove projects from solely in order to group symbol indexing and breakpoints when I'm working on or debugging those projects.