Visual Studio 2019 WebAssembly: Unbound breakpoint is not hit
Asked Answered
E

1

4

In the last couple of days I completed a minor upgrade of Visual Studio 2019 from version 17.0.xx to 17.1.1.

After completing this, breakpoints in the client project within my Blazor WebAssembly solution are not working. Hovering over the breakpoint displays:

The breakpoint will not currently be hit. Unbound breakpoint

This only seems to be affecting the client project. I can effectively set breakpoints in the server project under the same solution.

I have been searching this and have completed the following steps:

  1. Rebooted
  2. Clean and Rebuild solution
  3. Delete folder obj, bin, and vs; clean and rebuild solution
  4. Copied my launch settings from a prior version, clean and rebuild solution

None of these have had any impact.

How can I solve this?

Est answered 15/3, 2022 at 16:35 Comment(2)
I did have a similar problem in the past. The result was in the LaunchSettings.json, where this had been deleted: "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", As I indicated in my post, I copied the contents of the last working version's Launch Settings, but it made no difference.Est
Make sure you are on the latest version of the SDK 6.0.202. They fixed all sorts of issues surrounding blazor hosting. If you want to look at working config (but for Edge), see my answer here.Heathenish
N
6

I had the same, and I eventually fixed it by setting the Debug symbols to "PDB file, portable across platforms" in the build settings of the client project, as per the documentation.

Norma answered 5/4, 2022 at 12:3 Comment(1)
Ok, great. How does that resolve the issue, though? Incidentally, what is the issue? A proposed answer that doesn't contain an answer to either of those questions isn't actually useful.Scruff

© 2022 - 2024 — McMap. All rights reserved.