You can use the debugging utilities in the Data load editor to step through the execution of your script by using breakpoints, which enable you to inspect variable values and output from the script execution.
You can select whether you want to view any or all of Output, Variables and Breakpoints.
To show the debug panel, do the following:
Click in the data load editor toolbar.
The debug panel is opened at the bottom of the Data load editor.
The Data load editor debug panel contains a toolbar with the following options to control the debug execution:
Output displays all messages that are generated during debug execution. You can select to lock the output from scrolling when new messages are displayed by clicking .
Additionally, the output menu contains the following options:
|Clear||Click this to delete all output messages.|
|Select all text||Click this to select all output messages.|
|Scroll to bottom||Click this to scroll to the last output message.|
Variables lists all reserved variables, system variables and variables defined in the script, and displays the current values during script execution.
Setting a variable as favorite
If you want to inspect specific variables during execution, you can set them as favorites. Favorite variables are displayed at the top of the variable list, marked by a yellow star. To set a variable as favorite, do the following:
Click on the next to a variable.
The is now yellow, and the variable moved to the top of the variable list.
You can apply a filter to show only a selected type of variables by using the following options in the variables menu :
|Show all variables||Click this to show all types of variables.|
|Show system variables||
Click this to show system variables.
System variables are defined by Qlik Sense, but you can change the variable value in the script.
|Show reserved variables||
Click this to show reserved variables.
Reserved variables are defined by Qlik Sense and the value cannot be changed.
|Show user defined variables||
Click this to show user defined variables.
User defined variables are variables that you have defined in the script.
To learn more about variables, see Working with variables in the data load editor.
You can add breakpoints to your script to be able to halt debug execution at certain lines of code and inspect variable values and output messages at this point. When you have reached a breakpoint, you can choose to stop execution, continue until the next breakpoint is reached, or step to the next line of code. All breakpoints in the scripts are listed, with a reference to section and line number.
Adding a breakpoint
To add a breakpoint at a line of code , do one of the following:
In the script, click in the area directly to the right of the line number where you want to add a breakpoint.
A next to the line number will indicate that there is a breakpoint at this line.
You can delete a breakpoint by doing either of the following:
In the script, click on a next to the line number.
- In the list of breakpoints, click next to a breakpoint.
You can also click and select Delete all to delete all breakpoints from the script.
Enabling and disabling breakpoints
When you create a breakpoint it is enabled by default, which is indicated by next to the breakpoint in the list of breakpoints. You can enable and disable individual breakpoints by selecting and deselecting them in the list of breakpoints.
You also have the following options in the breakpoints menu :
- Enable all
- Disable all