Set a Watch on Variables as we debug through the Microflow/Nanoflow - Mendix Forum

Set a Watch on Variables as we debug through the Microflow/Nanoflow


Problem Statement:

Whenever we want to analysis the attribute value of an object while debugging a microflow/nanoflow, we have to expand the object from the variable list, scroll to the respective attribute and check for the value everytime we “Step into”, “Step over” or “Step out”.

Real Time Description:

Imagine we have placed a breakpoint at the start of the microflow. When the breakpoint is triggered, we go to the variable pane > expand the object called “Entity” and check for the value of the attribute called “Stage”.

As we hit on “Step into”, the variable pane get reset will all the variables in scope being auto collapsed. 

In order to check the value of attribute “Stage”, we need to again repeat the steps of expanding the entity and scrolling to the attribute and checking the value.

At first, the problem statement seems to be an easy one. However when the complexity of the microflow increases with a lot of variables in scope including lists, the effort of watching an variable increases exponentially.

Suggested Solution:

We can add a feature to “Watch a Variable” as we step through the microflow/nanoflow by double clicking on an attribute name or by right clicking on an attribute and clicking on “Set to Watch”. This helps in the attribute to be in sight till it is in scope of the flow




5 answers

Some more attention to the Mendix debugger features would be great.


@Marco Spoel , that sounds cool too. Only advantage of “Set to watch” over “AutoFocus” would be, sometimes we are more interested in seeing how a particular object/list changes over a set of activities in a said MF/NF.


Nonetheless, we can have both the features available to us :)


The “Set to watch” option could also be replaced by an autofocus function that just jumps to the active object/variable in the MF/NF 


Great feature to have.


This is really a good feature to have, as being a developer, we spend most of the time on the debugger pane which is also a helpful one.