You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't find any workarounds. If someone can help me, I'll be very appreciated.
Steps to reproduce:
Create a Console Application, choose the .NET6.0.
Put the breakpoint in a Console.WriteLine, start the debugging.
When the debugger hits the breakpoint, put the following statement in the Immediate Window:
new[]{1,2,3}.Select(x => new{Index = x})
Select this statement, and execute any of the Dump As ... commands.
Expected result: Object is dumped successfully. Actual result: Exception: The expression cannot be evaluated. A common cause of this error is attempting to pass a lambda into a delegate.
Notes:
There is a workaround for new[]{1,2,3}.Select(x => x) - just add ToArray() call at the end of the statement: new[]{1,2,3}.Select(x => x).ToArray()
Also, replacing the anonymous type with a ValueTuple and ToArray runs without errors: new[]{1,2,3}.Select((i, x) => (i,x)).ToArray()
The text was updated successfully, but these errors were encountered:
I can't find any workarounds. If someone can help me, I'll be very appreciated.
Steps to reproduce:
Create a Console Application, choose the .NET6.0.
Put the breakpoint in a Console.WriteLine, start the debugging.
When the debugger hits the breakpoint, put the following statement in the Immediate Window:
new[]{1,2,3}.Select(x => new{Index = x})
Select this statement, and execute any of the Dump As ... commands.
Expected result: Object is dumped successfully.
Actual result: Exception: The expression cannot be evaluated. A common cause of this error is attempting to pass a lambda into a delegate.
Notes:
There is a workaround for
new[]{1,2,3}.Select(x => x)
- just add ToArray() call at the end of the statement:new[]{1,2,3}.Select(x => x).ToArray()
Also, replacing the anonymous type with a ValueTuple and ToArray runs without errors:
new[]{1,2,3}.Select((i, x) => (i,x)).ToArray()
The text was updated successfully, but these errors were encountered: