1

I've lost a lot of days on this and am hoping for some direction even if it is a different site to post on.

I am working on a Blazor Web Assembly application using VS 2022. About a week ago my debugger began no longer stopping on breakpoints in the client application. It does stop on the server app.

At the same time this problem started, I noticed that when I started a debug session it started opening a new tab rather than a new window in Edge; not sure if this is related.

A few points:

  • The behavior is consistent between MS Edge and Chrome.
  • If I create a new app, the new app stops on breakpoints.
  • I am on VS 2022. Tried it on VS2019 on the same laptop with the same results.

Been searching and finding little things to try here and there, but nothing has made a difference.

I can't think of any changes I have made to the environment, etc.

Hoping for some kind of guidance.

Prv
  • 137
  • 10
  • 1
    Is this an app that has been upgraded from 5 -> 6? If so you may want to compare the LaunchSettings.json in the Properties folder with the new app. – Brian Parker Jan 11 '22 at 00:26
  • 1
    Have you tried closing VS and deleting the `.vs`, `bin` and `obj` folders from the solution? – Mister Magoo Jan 11 '22 at 02:20
  • I had a similar problem. I found a workaround, see [my answer here](https://stackoverflow.com/a/72037574) for working config. – lonix Apr 28 '22 at 03:21

1 Answers1

4

Thank you BP and MM for your help.

The problem ended up being in the LaunchSettings.json file on the server app. It was missing the line:

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

I have never updated this file and can only assume that it was there before because I have been debugging successfully for quite awhile. I have not upgraded from 5 => 6.

While I don't know the root cause, it is now working. Thanks again.

buddemat
  • 4,552
  • 14
  • 29
  • 49
Prv
  • 137
  • 10
  • This worked for me. Interestingly, Debugging was working and then suddenly it wasn't. I inspected the `launchSettings.json` file and this line was missing. Added it, and it started working again. – Stephen Ellis Aug 14 '22 at 10:31
  • This worked for me too. inspectUri was missing in the server project's launchSettings.json in one of the profiles. Thanks! – M.V. Dec 21 '22 at 09:12