Reputation: 127
I've got a makefile based project set up that builds my code on multiple platforms. On my Mac I want to use Xcode for debugging though. I've set up an Xcode as an External Build Project I can run the application from within Xcode. The output is shown in Xcode and if the app crashes it drops in to the debugger, but when running the debugger cannot locate the source files, so I just see assembly output. How can I tell Xcode where to locate the source?
I also cannot set breakpoints, but I think that this is all the same problem.
Upvotes: 7
Views: 7375
Reputation: 154
Just had this problem and this worked (Xcode 4.6) (got source debugging and working breakpoints)
Upvotes: 4
Reputation: 1467
I was able to fix the issue of not stopping at breakpoints by setting a custom working directory for the executable. Before this change I was able to build successfully using the external scons system from Xcode 4. My code would run when called from XCode but breakpoints would be ignored.
Then in XCode, Go to Product -> Edit Scheme... CHeck 'use custom working directory' and I set this to the same directory as the executable.
Breakpoints then started working.
Upvotes: 6
Reputation: 11
In "Project Navigator" (the file-folder icon just below the "Run" button), right click and select "Add Files To your-project". Browse to the top level folder where you would normally run the external build, and click Add.
Upvotes: 1