Debugger (Event handling)
The debugger can be reached via the main menu and is structured as follows:
1 |
Starts/pauses the debugger. If the block with the breakpoint is executed next, the debugger pauses the execution for analysis purposes. |
2 |
Lists all active breakpoints. |
3 |
Stops the debugger and discards all breakpoints in the process. |
4 |
Restricts pausing at breakpoints to selected sessions.
|
5 |
Shows all breakpoints that are currently paused. The name of an entry consists of the abbreviated type name (e.g. AEHC for event handling), the ID of the containing configuration and a consecutive counter, as well as the user name of the session and a source (for the behaviour of the behaviour name). |
6 |
These functions can be used to decide in a granular way whether and how to continue at a paused point.
|
7 |
Shows the state of the input data (result), all variables and the current log messages. ►NOTE◄ For behaviour, the 'Variables' tab shows no entries and the 'Log' tab shows only the element ID of the triggering element and the type of interaction (e.g. MANUAL_CHANGED if the user triggered their own behaviour). |
►CAUTION◄ While a breakpoint is active in an event handling, a server thread and a database transaction (usually) is completely blocked. Therefore, longer debugging should be done on live systems only in emergencies. This does not apply to client workflows and behaviour.
Set breakpoints
In modules of event handlings and client workflows:
Right click or '...' Module menu (rule or action).
In behaviour and actions
Use case
A portal passes a numeric value as variable 'n' to the event handling of a custom action event called 'Iterate'.
Clicking the Iterate button triggers the custom action event 'Iterate' and additionally the value of the numeric text field is passed as parameter 'n'.
An associated event handling first checks whether the parameter 'n' is >= 0 and if so, a loop is run 'n' times, adding the index of the run to an 'entries' list.
This is now checked step-by-step with the debugger.
Example 1
The debugger is opened and started.
After that a breakpoint is set in the checking rule:
The block is then visually highlighted accordingly.
Next, open the portal, enter the value '5' in the text box, and then press the Iterate button.
The debugger now automatically moves to the foreground and shows the state of event handling at the time BEFORE the rule was executed.
In the Variables tab, all variables valid at the current time can now be viewed.
Here you can clearly see the parameter 'n' as a variable with the value 5.
With a 'Step' in the debugger (6) the further logic can now be 'stepped through' module by module.
The currently visited module is also visually highlighted accordingly.
Example 2
The individual iterations of the loop are analyzed. Therefore, a breakpoint is set in the 'Modify list' module.
Starting from the last state from example 1, the individual loop passes can now be analyzed with the 'Resume' function in the debugger (6).
A look at the state of the variables shows that the loop variables are now also available:
By repeatedly pressing the Resume button it is possible to observe how the variable '$index' is incremented and entries are added to the 'entries' list.
Below table shows the state of the two variables for each paused breakpoint.
Cycle |
entries |
$index |
0 |
< key xsi:type = "xsd:string" >entries</ key > < value xsi:type = "list" ></ value > |
< key xsi:type = "xsd:string" >$index</ key > < value xsi:type = "xsd:int" >0</ value > |
1 |
< key xsi:type = "xsd:string" >entries</ key > < value xsi:type = "list" > < entry xsi:type = "xsd:int" >0</ entry > </ value > |
< key xsi:type = "xsd:string" >$index</ key > < value xsi:type = "xsd:int" >1</ value > |
2 |
< key xsi:type = "xsd:string" >entries</ key > < value xsi:type = "list" > < entry xsi:type = "xsd:int" >0</ entry > < entry xsi:type = "xsd:int" >1</ entry > </ value > |
< key xsi:type = "xsd:string" >$index</ key > < value xsi:type = "xsd:int" >2</ value > |
3 |
< key xsi:type = "xsd:string" >entries</ key > < value xsi:type = "list" > < entry xsi:type = "xsd:int" >0</ entry > < entry xsi:type = "xsd:int" >1</ entry > < entry xsi:type = "xsd:int" >2</ entry > </ value > |
< key xsi:type = "xsd:string" >$index</ key > < value xsi:type = "xsd:int" >3</ value > |
4 |
< key xsi:type = "xsd:string" >entries</ key > < value xsi:type = "list" > < entry xsi:type = "xsd:int" >0</ entry > < entry xsi:type = "xsd:int" >1</ entry > < entry xsi:type = "xsd:int" >2</ entry > < entry xsi:type = "xsd:int" >3</ entry > </ value > |
< key xsi:type = "xsd:string" >$index</ key > < value xsi:type = "xsd:int" >4</ value > |
This simplified example shows that, especially with regard to loops, the use of the debugger can greatly simplify the debugging or algorithm analysis.