I have a solitary .cpp file, and I would very much like to debug it.
Without creating an Xcode project, is there anyway I can debug this using the Xcode debugger?
When I open the file in Xcode to edit and set breakpoints, the program doesn't stop at the break points.
You can't debug via Xcode without a project because without a project, Xcode works only as a file editor with color highlight and so one.
For debugging you need an executable compiled with debug option, which is produced via a compiler. The easy way (but in my opinion the worse) is to make a Xcode project and put the .cpp file there. There is the hard way too (and probably the best for future reference) that is to learn to do it on the terminal, using for instance the g++ (compiler) and gdb (debugger).
If noone answers you later, maybe this post will help you
I'm not a XCode developer, but I know, that to debug a process you need:
a debugger
the corresponding (!) code
the info, which stores a special debugging info, which gives the debugger an opportunity to map from binary process to your C++ (or other) code
and the process, sure :)
this link could help to understand if you have debugging info
http://www.meandmark.com/xcode3debugging.pdf
you can search words "Debug Information" and try to understand, if you have it or not
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With