If you include a CPP file from another CPP file, Xcode refuses to break at any breakpoints in the included CPP file. I'm going to raise an error with Apple, but just wanted to mention it here if others have come across this and may have found ways around this.
There are very good reasons why you can include CPP files from CPP files, which I will not include. Suffice it to say that I cannot just rebuild the project to compile the included files directly.
Example: a very simple iPhone project
main.mm
extern void FunctionInSource1( int a ); int main(int argc, char * argv[]) { FunctionInSource1( 1 ); return 0; }
source1.cpp
source2.cpp
void FunctionInSource2( int b ) { int c = b; c = c + 1; return; }
main.mm and source1.cpp are members of the target, that is, they are configured for assembly. source2.cpp is NOT a member of the target and is NOT compiled, except through its inclusion in source1.cpp
Setting a breakpoint anywhere in source2.cpp does not start. Breakpoints elsewhere work fine. Notabene, you can still enter source2.cpp from source1.cpp, for example, just not break directly into source2.cpp
If anyone came up with a solution, I would be very happy to hear about it.
Max
source share