5

I'm trying to debug a Blazor web assembly app with breakpoints.

If I add a breakpoint within Visual Studio I get this message on my breakpoint.

The breakpoint will not currently be hit no symbols where loaded for this document.

I updated visual studio.

I made sure the inspectUri was added to both the client and server setting.json.

I unchecked enable diagnostic tool while debugging in settings.

I tried to run as administrator. I also tried the answer here: How do I remedy "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning?

Any help will be appreciated

Regards,

Jack
  • 51
  • 3
  • I'm also having this same problem. I guess I hadn't tried it until now. I've got a foreach loop wrapped around some HTML and I go and add a variable into it with a breakpoint set. The breakpoint gives me this same message. – Aaron Jul 16 '21 at 15:43
  • It works on my end. Try to use Edge Browser and wait for a couple of seconds. If not try this https://stackoverflow.com/a/63499076/12963806 Thanks. Hope this helps you. I'm using visual studio IDE – OnceACurious Aug 02 '21 at 07:15

1 Answers1

0

At the begining you should know WASM debuging works on Chromium browsers like Edge and Chrome. Then make this changes.

Open launchSetting.json file, in IIS Express profile and add this code after "launchBrowser": true,:

"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",

Repeat it for other profiles, for example TestBlazor.WASM.

This peace of code:

  • Enables the IDE to detect that the app is a Blazor WebAssembly app.
  • Instructs the script debugging infrastructure to connect to the browser through Blazor's debugging proxy.

Those changes works well but in some cases that failed, add this "nativeDebugging": true to all profiles.

If your App hosts on another base app than /, change the properties like this:

"iisExpress": {
    "applicationUrl": "http://localhost:{INSECURE PORT}/{APP BASE PATH}/",
    "sslPort": {SECURE PORT}
}

And for each profiles:

"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/{APP BASE PATH}/_framework/debug/ws-proxy?browser={browserInspectUri}",
Shadman
  • 131
  • 1
  • 10
  • Hey @Shadman. My app launches on another base path than `/` and I have tried to use your advice but didn't succeed. Maybe you have some repository on GitHub with a configuration json file? – Allaev Bekzod Mar 20 '23 at 09:24