Can't obtain local variable values when debug UWP in VS2015

When I start to debug a UWP project in VS2015, a warning is prompted:

Then I take a look at the “Use managed compatibility mode” option and find it’s already checked:

But I still can’t get any local varaible value during debug:

This issue can still be reproduced on 8.2.88.1887

This requires a rewrite of the evaluator engine. We’ve started this process already but it’s not done in time for the upcoming build.

As a temporary workaround, can you try unchecking it? That will probably use the C# evaluator but should at least show the local info.

Unfortunately unchecking the Managed Compatibility Mode isn’t helpful to show the local info.
But that’s fine and I can wait for the new evaluator engine. I can still use the log to print variables.

(upcoming 8.3 bulds)

1 Like

Carlo,
a little question on this screenshot (the problem is already here for years): why the column with the type is always so short?
I need to widen it each time I restart VS.

That’s odd. (Above is VS experimental which resets every time I use it, so it would have this) ; just confirmed this happens but that’s pretty odd. We don’t control that at all.

@Esword

If you add:

{$IFDEF DEBUG}
[Assembly: System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations or System.Diagnostics.DebuggableAttribute.DebuggingModes.Default)]
{$ENDIF}

(or the C# equivalent)

#if DEBUG
[Assembly: System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations | System.Diagnostics.DebuggableAttribute.DebuggingModes.Default)]
#endif

to the AssemblyInfo file the locals should work a lot better.

Great! That Debuggable attribute solve the problem, thx :ok_hand: