4

I want to put a breakpoint in a file that's part of a library used in my application. If I simply open the .cpp file in XCode, it gets its own window, and breakpoints are never triggered.

But when Xcode opens a source file in the same library - because of an exception for example - that file gets opened in the application project/workspace window. If I set a breakpoint here, it will get triggered.

So how do I simply open a source file and set breakpoints on it? I remember in VC++ you just opened the .cpp file and it figured out if there were debug symbols, but not so here?

2 Answers 2

0

You can set a symbolic breakpoint on a function that is hit in that file. Xcode will open the file when the breakpoint is hit and from there on you can set breakpoints by click as long as the file remains in the most recently used list.

It's a pain in the a. But Xcode cannot handle it better. Technically it wouldn't be a problem (other than the other answer says) The symbols contain the path, so matching is no problem. That's why it works once you tricked XCode to open it...

-1

You have to start the library with the app as hosting executable otherwise Xcode doesn't know what relationship the source has to your binary of the library

1
  • OK, that makes sense. How do I do it?
    – Mr. Boy
    Nov 8, 2012 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.