For anyone confused by this debugger behaviour like me.
While stepping through a workflow in debug mode it looks like debugger is sometimes one step ahead me - when stepping into an activity the “Immediate” window already shows result that should show when leaving the activity.
This might be wery confusing when you place a breakpoint at activity B to check result of preceding activity A … and you actually get result of activity B
UiPath AI recommended the following:
Hello! I found some suggestions for your issue:
When stepping through a workflow in debug mode, it is possible that the “Immediate” window may show the result of an activity before you actually step into it. This behavior is expected and is not a bug or issue with the debugger.The “Immediate” window in UiPath Studio operates on all arguments and variables, which means it evaluates their values at each step of the debugging process. This can sometimes cause the window to display the result of an activity before you step into it.
To ensure that you see the result of an activity when leaving it, you can use the “Step Over” action instead of “Step Into”. The “Step Over” action allows you to debug the next activity without opening the current container. This way, you can skip the analysis of the current activity and see its result when you leave it.
But I do not think it is correct. Showing the result of an activity BEFORE it is executed is like eating the cake before it is prepared, and it is definitely a BUG.
There is a workaround: Place “Comment” activity before the activity that evaluates prematurely and put breakpoint there.
Affected Studio version 2023.10.x
Sample workflow that demostrates this bug.
debug_err.xaml (9.7 KB)
Cheers