Skip to main content Skip to complementary content

Debugging the data load script

You can use the debugging utilities in Data load editor or Script 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 Debug Debug in the data load editor toolbar.

    The debug panel is opened at the bottom of the Data load editor.

Information noteYou cannot create connections, edit connections, select data, save the script or load data while you are running in debug mode. Debug mode begins with debug execution and continues until the script is executed or execution has been ended.

Debug toolbar

The Data load editor debug panel contains a toolbar with the following options to control the debug execution:

Debug toolbar options
UI item Description
Limited load

Enable this to limit how many rows of data to load from each data source. This is useful to reduce execution time if your data sources are large.

Enter the number of rows you want to load.

Information noteThis only applies to physical data sources. Automatically generated and Inline loads will not be limited, for example.
Play Start or continue execution in debug mode until the next breakpoint is reached.
step in Step to the next line of code.
Stop End execution here. If you end before all code is executed, the resulting data model will only contain data up to the line of code where execution ended.

Output

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 Lock.

Additionally, the output menu menu contains the following options:

Output menu options
UI item Description
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

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 Favorite next to a variable.

    The Favorite is now yellow, and the variable moved to the top of the variable list.

Filtering variables

You can apply a filter to show only a selected type of variables by using the following options in the variables menu menu:

Variables menu options
UI item Description
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.

Breakpoints

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 Remove next to the line number will indicate that there is a breakpoint at this line.

Tip noteYou can add breakpoints even when the debug panel is closed.

Deleting breakpoints

You can delete a breakpoint by doing either of the following:

  • In the script, click on a Remove next to the line number.

  • In the list of breakpoints, click Cancel next to a breakpoint.

You can also click menu 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 Checkmark 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 menu:

  • Enable all
  • Disable all

Learn more

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!