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 option, or keyboard shortcuts, or from the Debug toolbar that you can make display using View/Debug toolbar menu option in the Editor. The Debug menu or Debug toolbar contains the execution choices of the debugger. The two main ways to run a script in debugging 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.

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 option, or click the Stop debugging icon in 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.

IMPORTANT - DEBUGGER LIMITS : As you step through the script code, the focus moves between the Editor window and the window of the application under automation. After executing each script line, WinTask debugger deactivates the application window and moves the focus to the Editor window. Before executing the next line, the debugger re-activates the application window. So for example, if the script right clicks a context menu, the activation of the Editor window will close the context menu and next step execution will fail.

The following topics explain the different ways you can use Debug Mode :

Step into (step by step execution)

Step over (the whole call of a Sub/Function is executed without any stop)

Step out (the subsequent lines of a Sub/Function are executed without any stop)

Breakpoints

Run to cursor

Watch variables