Skip to content

[wasm][debugger] Debugger not working when managed libraries don't have pdb file #71456

@thaystg

Description

@thaystg

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions