Trouble understanding debugger in Xcode

Having some trouble getting my development environment set up, particularly the debugger.

I started a new audio plugin project with Projucer, and and build and run the plugin.

But when I insert some code into my Processor class and try to run the debugger, I see two issues:

  1. Certain variables don’t show up in the debug window? Here, “a” doesn’t show up!
  2. Breakpoints don’t seem to work like I’d expect, unless there’s some threading going on which I don’t understand. In the screenshot I posted, the code should ONLY reach the first DBG() line, not the second, right? I’m seeing both “0” and “1” get printed.

  1. At the bottom of the debug section it is possible to select the visible variables. In the picture the value is on “local”, with “all” you should see all your variables.
  2. If you have compiled the source, then modified and then debugged (without recompiling), the lines no longer match. Make sure that the sources are recompiled before debugging (and that you use the right binary)