Data Sheet

LABCENTER ELECTRONICS LTD.
196
To take a simple example, lets set a breakpoint in the main event loop when a button is
released. The easiest way to set/toggle a breakpoint is to double click on the line of code that
you wish to break on. The breakpoint indicator should appear at the left of the source window
beside the line of code in question. If you set a breakpoint by mistake then you can remove it or
toggle it off by double clicking again on the line (or from the right hand context menu).
If we run the simulation now (play button) it will switch happily execute in free running mode
until we release the mode switch button (S1) at which point the code for button release will be
hit and the simulation will pause. You can do this easily by clicking on the button in the active
popup window.
Having hit our breakpoint we can single step our code (and the system) via the usual
commands which can be found at the top right of the source window or on the debug menu in
VSM Studio. Alternatively you can use the F10 and F11 shortcut keys for 'step over' and 'step
into' respectively.