Hi Jan,
You can put a breakpoint on an 'if', I simply pointed out that the breakpoint will only be hit if the 'if' evaluates to true.
Arduino does not have debugging so Visual Micro uses serial in the background. This means that during the compile process we have to inject serial.print() statements into the temporary copy of the code used by the compiler. The breakpoints are in a known format so that Visual Micro can intercept the messages and update running debugger status/trace/expressions windows.
Because serial messages are injected it was easier to inject at the end of a line. You have to think of a breakpoint in the same way as you would have done if you had manually added your own serial.print() debug statements throughout your code.
This means you can put breakpoints on blank lines and code lines which is weird but flexible. It's not a perfect solution but often better than hacking your code.
So the breakpoint on an 'if' executes inside the 'if' allowing you to put the breakpoint the line before to halt on the 'if'
Something important that appears to be lost somewhere within the depths of the new documentation is a note to explain that the default speed for the debugger is 115k. If your sketch code is sharing the same serial port that the debugger uses then you will see that the serial monitor shows a speed of 115k when the debugger opens.
Because your code has elected to use 9600 then you need to tell Visual Micro to use 9600. You do this using the LocalSpeed and RemoteSpeed project property. You will see that in your case you can just fill in one of the properties and the other will automatically populate with the same value. Either that or alter your sketch serial.begin() to 115k
So the fact that your arduino is sending at 9600 but the pc is using 115k is the reason why no breakpoint data is appearing.
How to find the project properties window is here
http://www.visualmicro.com/page/User-Guide.aspx?doc=Project-Properties-window.ht... nb: You will also see that you can use one or two digital pins or other serial ports should in the future you find that your code design and/or the debugger need exclusive access to a port. This is immediately the case if your own code uses the Serial.read() functions and Visual Micro is allowed to break/pause or wait at start-up.