To debug programs with bugs, run target programs with Debugger. When you need to reach specific command or edit specific variable, pause with Debugger. While the program is paused, user inspects current value of data and check if program is following expected path.
Debug is divided into ‘Debug’ that targets the whole project and ‘Debug Form’ that targets only currently opened Form. The Debug function explained in this document is focused on the ‘Debug Form’ function.
Debug Start
This will be explained through an example of a Form that sums 1 to 100.
To check changing values while running program, set up Breakpoint. To set up Breakpoint, move cursor to target line and press <F9>. To delete Breakpoint, move cursor to target line and press <F9> again. Breakpoint shall be removed.
Run program in Debug mode. If you set up more than one Breakpoint from source code, click Debug Tool Bar shown in the [Figure] or select Menu [Debug – Start Form Debugging]. Same function will be done when you press the shortcut key, <F6>.
Figure below shows the screen when the program is paused. The arrow shown in the screen directs the location of command line that is currently being executed.
When Debug starts, Debug, Watch, Call Stack, and Variables windows will be activated as below.
Debug Window
Watch Window
When you want to know the current value of variables and formulas traced by Debugger or the current value of specific variables when program pauses, register target variable in the Watch Window as shown in [Figure]. The changing values will be shown when program pauses or is in progress.
You can enter variable name directly to ‘Expression’ of Watch Window with keyboard, or add variable name by using drag & drop from the Variables window.
Expression added in Watch Window can be deleted by using <Del> key, and the Watch Window list is separately managed in the UX-Studio, so the latest Expression list is displayed when opening project.
Variables Window
This is a screen that shows current value of variables which can be accessed from a pause position.
Debug Window
[Figure] is a screen which displays the status of Debugger.
Call Stack Window
[Figure] is a screen which displays functions that came across up to the point of pause in a reverse order.
Debug Menu
Functions provided in the Debug Menu are as below.
Menu | Icon | Function | |
---|---|---|---|
1 | Start Debugging | Start debugging mode of project<F5> | |
2 | Start Form Debugging | Start debugging mode of currently selected Form <F6> | |
3 | Stop Debugging | End debugging mode | |
4 | Restart | Restart debugging mode | |
5 | Step Into | Debug one step at a time, When summoning other functions in step, move to relevant function <F11> | |
7 | Step Over | Run remaining parts of current function and stop at the next line after function summoning is done | |
8 | Step Out | Debug one step at a time, After running one step, move to the next step<F10> | |
9 | Run to Cursor | Stop after progressing to the line where cursor is currently at | |
10 | Toggle Breakpoint | Set/Clear Breakpoint <F9> | |
11 | Delete Selected Breakpoint | Clear selected Breakpoint from the Breakpoints Window | |
12 | Delete All Breakpoints | Clear all Breakpoints | |
13 | Go To Source | Move to Source Code location of selected Breakpoint | |
14 | Enable/Disable Selected Breakpoint | Activate/Deactivate selected Breakpoint from Breakpoints window | |
15 | Enable/Disable All Breakpoints | A function which activate/deactivate all set Breakpoints |