You are here:

Using the debug window

By setting debug to true with debug on and giving delay an value greater than 0 You can step through Your program. With the delay value the execution is halted for the time in milliseconds. Eg. 1500 delay ! will wait 1.5 seconds until the execution is continued. With the light green button in the right upper corner You can continue immediately.

forget tm

1500 value tm  (* define a delay time from 1,5 sec *)

clear
debug off

."coloring used in the debug window" cr
."––––––––––––––––––––––––––––––––-" cr
."blue: the 1. line with the currently executed word" cr
."red: every time a 1. entry is pushed on an empty stack" cr
."(the debug window is opened)" cr
tm @ delay !   (* setting the delay time *)
debug on       (* show debugging window *)

."pushing 1 on stack" cr
1
."pushing 2 on stack" cr
2
."pushing 3 on stack" cr
3
."pushing 4 5 6 7 on stack" cr
4 5 6 7

."black: values currently lying on the stack" cr cr
."dropping 2 numbers from stack" cr
2drop
."lightgray: \"fading\" deleted values" cr cr
0 delay !
." if its going too slowly You can continue by pressing the lightgreen square in the right upper corner…" cr cr

7th and the 7th logo are trademarks of 7th Stone Software GmbH. All other product or service names are the property of their respective owners.