XCode: Debug assertions in Juce code

Hi all,

I’m including the Juce sources with the amalgamated cpp files as well as the amalgamated header (projects created with Introjucer).
When an assertion fails inside Juce code the debugger breaks but won’t jump to the assertion’s line. This is quite annoying since I also can’t access the source code directly in XCode as they are included in the amalgamated cpp files. So what I do atm is look in the debugging console in which file the assertion failed, search it with Finder, open it and scroll to the mentioned line.
I assume this isn’t the usual way to handle this.

Is there any way to get XCode to behave as one would expect it (jump to the line that broke the debugger)?
I haven’t felt the need to debug with breakpoints inside the Juce code on Mac but I assume similar problems arise when doing so.

Thanks,
Chris

I’d suggest including the juce cpp files directly rather than the amalgamated ones - that’s the way I work, and it lets you debug without any problems.

Hi Jules,

I just looked in the Jucer-file. I use “Include Juce Source Code Directly (Split across several files)” in “Juce Linkage Method”. Do you mean this (which causes the above mentioned behaviour in my enviroment), or do you include the cpp files as such in the XCode project?
aI got a bit confused cause the Juce include is still the amalgamated file.

Thanks,
Chris

Well, the header’s still the big amalgamated file, but all the cpp files aren’t, and that’s where almost all the assertions are… I use projects like that in Xcode every day and have never had any problems getting the debugger to show me an assertion (?)

I’ll have a look whether something in my XCode configuration might be wrong.
I assume you use gdb as debugger (is there even any alternative for XCode?)

Thanks again,
Chris

Yep, I just use the normal off-the-shelf version of Xcode, nothing fancy.