Editor-Debugger

 Whatch the related video: https://youtu.be/H_aGIalnvm8

To start debug mode is prefearable that source file is already compiled and verified that is error free.

It must be an mcu in the circuit corresponding to the source mcu target.

Then you can press the "Start Debugger" button and if everithing is correct debugging mode will be started.
A message in bottom panel will confirm if debugging mode was correctly started and an "arrow icon" will point to first code line:


Power button will change to blue, indicating that debugger took control of circuit simulation.
By default circuit simulation will run at normal speed while the mcu execution will be controlled by debugger steps.
Since 0.2.9 there is an option to "synchronize" circuit simulation to debugger execution. To understand how it works and when to use it please read this page.

Note that the available action has changed, instead of file open, save, etc. now there are a new set of available controls, from left to right:

- Step: run one line of source code.

- Run to Breakpoint: run upto next breakpoint.

- Pause: stops running process.

- Reset: restart to program start.

- Stop: stops debugger and return to edit mode.


Note that "Pause" stops the running process but keeps in debugging mode and "Stop" actually stops debugger and return to edit mode.

Now you can run your code step by step, or you can add breakpoints, for that:
- Right-Click on the line number you want the breakpoint.
- Select "Add Breakpoint" or "Remove Breakpoint".

A yellow square will appear in the selected line.
Now you can "Run to next Breakpoint" and the arrow will jump to the breakpoint ( if reachable ) or keep running until breakpoint is reachable.



The debugger will set mcu Mhz to 0, and restore the previous value afther debugger is closed.
So be sure to stop debugger when you finish a debugging session.

You can still watch mcu registers and variables in Ram Table.
Only global variables will be detected.

Once you finish your debugging session you must stop it and exit from debugging mode.