For example, in this code snippet Xcode will not stop at the breakpoint:(Note, the issue may not arise when setting up a new project, but it may arise, when adding a new target to an existing project).
// main.mm #import <Foundation/Foundation.h> #include <vector>
int main(int argc, const char * argv[]) { @autoreleasepool {
>>> std::vector<int> v; v.push_back(1); NSLog(@"finished"); } return 0; }
This may happen with any compiler (language Dialect) and with GNU's and clang's standard c++ library.
*Sometimes* means, that for unknown reasons this had never worked and will never work for a project, or it just happens for an existing project at an arbitrary event, and once this failure is set, I'm unable to persuade Xcode to behave correctly again.
A related issue is maybe that *per default* standard C++ headers without extension will not be recognized by the compiler as proper C++ headers. A possible workaround is NOT to set the Editor's syntax options to C++, because this only enables syntax highlighting (which works fine), but does not let Xcode recognize and gather the symbols defined on the header, nor does it enable us to set breakpoints.
I couldn't find any differences in the build settings between projects that do not show the issue and projects that do show the issue.
Any hints, what I can do to alleviate this problem?
Thanks in advance!
Andreas |