Does anyone else experience XCode always breaking on String::~String() whenever you set a breakpoint near a DBG() statement? Without fail, on XCode on both my iMac (10.9.5) and my laptop (10.11) the DBG() statements always cause XCode to break on the StringHolder::release(text); line. It’s the strangest behavior, and has been that way as long as I have been using juce (about 2.5 years).
It’s not horrible, just annoying. every time i am stepping through my code, I’ll step over a DBG() statement and find the debugger automatically pausing on String::~String()
Anyone else experience this?
Same goes for the occasional Debugger pauses inside or if I happen to use std::vector<> operator[]
…maybe it’s the _LIBCPP_ASSERT()? it’s just weird…
and when we step over it’s stepping into the tempDbgBuf destructor.
The odd thing…
{
int g = 9;
int f = 10;
// String szTest ("Hey");
DBG ("Test: " + String (g) + String (f)); // Breakpoint on this line
++g;
}
You have to F6 (Step Over) twice to perform the step and with the szTest String commented out you don’t step into the String destructor… but if you simple uncomment that line and step over again… Xcode will step into the Destructor.
I do a lot of debugging and can’t say I’ve ever noticed a problem like that.
My main beef with Xcode is that it regularly just gets all the line numbers out by 1, so that errors and debug positions are shown wrongly, but a workaround for that is just to close and re-open the source file, which seems to make it re-scan it and recover.