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 *)

debug off

."coloring used in the debug window" 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
."pushing 2 on stack" cr
."pushing 3 on stack" cr
."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
."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

We respect Your privacy and we neither track You nor use cookies…
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.