About program tracing

Spectaculator has a number of sophisticated tracing facilities to make it easy to debug code you have written yourself or help you understand someone else's code:

Trace (F5)

Trace closes the debugger window and executes the program until a breakpoint is reached.

Stop Debugging (Shift+F5)

Stop Debugging closes the debugger window and continues program execution. Any breakpoints set will be ignored.

Step Into (F11)

This allows you to step through execution of code instruction by instruction. Some instructions (e.g. HALT, LDIR, CPDR and other block instructions) execute in a loop until a condition is met. You will need to single-step the required number of times to go past this kind of instruction.

Step Over (F10)

Like Step Into, Step Over steps through code instruction by instruction. Block move instructions such as LDIR and CPDR are handled differently. You only have to invoke Step Over once to execute the required number of interations of the instruction.

If a CALL or CALL cc instruction is reached, a temporary breakpoint is set on the following instruction and program execution is re-started (so you do not have to step through the subroutine being CALLed). If the CALLed routine never RETurns or plays with the stack, you may need to break back into the debugger to regain control.

Step Out (Shift+F11)

Step Out executes the program until the current subroutine RETurns. If the routine never executes a RET, RET cc or plays with the stack, you may need to break back into the debugger to regain control.

Run to Cursor (Ctrl+F10)

Run to cursor sets a temporary breakpoint at the address the caret (cursor) is on in the disassembly window and restarts program execution. If another breakpoint is hit before this temporary breakpoint, the debugger is broken into at that address.

Run until Interrupt (Ctrl+F11)

Run until Interrupt closes the debugger and restarts program execution. The debugger is broken back into when the emulated Z80 accepts a maskable or non-maskable interrupt (which could be never if interrupts are permanently disabled).

Run to Start of Frame (F9)

Run to Start of Frame closes the debugger window, restarts execution and breaks back into the debugger at the start of the next frame.

Run to End of Frame (Ctrl+F9)

Run to End of Frame closes the debugger window, restarts execution and breaks back into the debugger about 1,000 t-states before the end of the current frame.

Run Until Condition (F6)

Run Until Condition closes the debugger window, restarts execution and breaks back into the debugger when a condition is met.