Debugger - Immediate panel shows result of activity not yet executed

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 :frowning:

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

@J0ska,

That’s something new :astonished: Can you record the screen and share the gif or video?

In first step I do clone dt1 to dt2 so at entry to second step dt2 should contain only empty columns [Column1,Column2]
But it already contains rows [a,1] [b,2]

Or simply debug the attached XAML

Cheers

@J0ska,

I tried to replicate on this setup:

Studio 2024.10.5 - 10/11/2024
Enterprise Trial License
Per-user Installation

License Provider: Orchestrator
Activation ID:

Microsoft Windows 11 Home Single Language 64-bit
8.0.10

UiPath.System.Activities - 23.10.6

It’s working as expected.

A UiPath workflow screen depicting a sequence with activities including "Build Data Table" and two "Assign" statements, along with error indicators and the output panel at the bottom. (Captioned by AI)

Can you try upgrading the UiPath.System.Activities package to latest possible version?

Using UiPath.System.Activities 24.10.6

dt2 = dt1.copy works fine also.

Try code like this:

dt2 = dt1.AsEnumerable() _
.Select(Function(x) dt2.Rows.Add ({x(0), If(String.IsNullOrWhiteSpace(x(1).ToString), "Nothing", CStr(x(1)))})) _
.CopyToDataTable()

Cheers

@J0ska tried this one as well and it’s working as expected.

The image shows a coding interface for RPA (Robotic Process Automation) using UiPath Studio, with a workflow involving data table building, variable assignments, and an Excel process scope. (Captioned by AI)u

Not sure if there is anything specific with the Studio 2023.10.9 version.

@loginerror any thought on this?

Checked with Studion 24.10.6
Works as expected in this version.
So probably fixed in meantime…
Cheers

@J0ska,

Glad to hear! Let’s close the thread by marking the solution.

Cheers!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.