Using the Decoda Debugger with QlikView Expressor Desktop
When using Expressor Deskstop 3.10 and later (Expressor) you now have the ability to debug your Expressor Datascript code in the Lua coding and debugging IDE Decoda. This open source product must be downloaded and installed separately from Expressor.
Normally when you run a dataflow from within Desktop, code debugging is disabled. If you want to debug your code, you must specifically enable the Prompt for debugging property on the operator whose code you want to examine and select the new Start With Debugging menu item that is under the Start ribbon bar button. You will then be able to attach Decoda to the code you want to examine, set break points and watch variables, and step through the code.
The operators for which debugging is available are: Aggregate, Filter, Join, Multi-Transform, Read Custom, Write Custom, and Transform.
You can use this debugging feature with both expression and function rules. If your operator includes multiple expression rules, you will be able to examine each rule simultaneously as the debugger will cycle through the rules, which will be listed separatelly. If your operator includes a function rule with code in both required and optional functions (for example, the transform operator's filter and transform functions), you will be able to examine all the coding during the same execution of the dataflow.
Let's see how this all comes together.
When designing your dataflow, select the Prompt for debugging property on the operator whose code you want to examine.
You may only select this property on one operator on each step of the dataflow; it is not possible to simultaneously debug multiple operators on a single step.
Before running the dataflow start the Decoda application.
Run the dataflow by selecting the Start With Debuffing menu item from the drop down list under the ribbon bar's Start button or by pressing the Ctrl+F5 key combination. If you simply click the Start button, the dataflow will run without connecting to Decoda.
A message window will appear. Note the process ID that is associated with the process running the operator. DO NOT click OK at this time. You must first start the debugging process within Decoda.
Return to the Decoda IDE and select the Debug - Processes... menu item. This opens a window that lists all of the running processes. In this window, click on the ID column header to sort the processes by process ID, highlight the process corresponding to the operator whose code you are examining, and click Attach.
Momentarily the Decoda IDE will acknowledge that it is ready to start the debugging session.
Return to the message window of Step 4 and click OK. Execution of the dataflow will begin and a second message window will appear. DO NOT click OK at this time. You must first set break points and identify watch variables.
In the Decoda IDE, select the entry within the Project Explorer panel that corresponds to the code being examined and double-click on the function name. In the following screen shot both the filter optional function and the transform required function have code.
To set break points, place the cursor in front of a statement and press the F9 key. The F9 key can also be used to toggle the break point off and on.
To set watch variables, either: highlight the variable and drag-and-drop it into the Watch panel, or click in the Watch panel and enter the name of a variable.
Once break points and watch variables have been set, return to the message window of step 7 and click OK.
The application runs to the first break point; in this example to the break point in the filter function.
After examining the watch variables, press F5 to allow the code to execute to the next break point (in transform function).
Continue pressing F5 to process the remaining records.