-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Milestone
Description
In a Blazor Wasm App:
Change the content of the Counter.razor:
@code {
private int currentCount = 0;
private void IncrementCount()
{
var temp = new Exception("throwing new ex");
Console.WriteLine(temp);
currentCount++;
}
}
Add a breakpoint on line currentCount++;
Try to expand variable temp.
If we are using a release build of the runtime, or a installed version of .net7.
We cannot get this information
| MethodInfoWithDebugInformation getterInfo = await sdbHelper.GetMethodInfo(getMethodId, token); |
This returns null, as we don't have debug symbols, then we throw an exception and cannot get any value if this variable temp.
We need to refactor this code to be able to get the values even in a release version of managed libraries.