About Debug Mode
WinTask provides a script debugger as an aid in developing scripts. Using WinTask Debug mode, you can halt the script execution at a certain line, with the Editor showing the line in question, display the value of variables and then resume execution till the next line you have specified.
All debugger actions are available from the Debug menu, or keyboard shortcuts, or from the Debug toolbar that you can display/remove using View/Debug toolbar menu in the Editor.
The Debug menu or Debug toolbar contain the execution choices of the debugger. The two main ways to run a script in debug mode are:
Once the execution is paused by any of the ways described above, you can check the values of the variables that you have specified in the Watch window (small window at the bottom of the Editor with the Compiler Tab to see Compilation errors, and Watch Tab to check the values of variables when debugger is used). You can also modify the script code.
- The debugger stops before every executable line in the script, and then steps into (Functions/Subs) or steps over them. This way is also called step by step execution.
- The debugger runs through the script from the current execution point, without stopping, to the line of the editor that the cursor is on, or to the line where you have specified a breakpoint.
You can stop at any time the debugger by pressing Shift + F5 when the Editor window has the focus, or select Debug/Stop debugging menu, or click the Stop debugging icon on the Debug toolbar.
Any information used in Debug mode vanishes as soon as the Editor window is closed. ALWAYS SAVE the script before running it in debug mode.