79541548

Date: 2025-03-28 13:33:09
Score: 1.5
Natty:
Report link

Had same issues, found this thread, many of the solutions either didn't work, or disabled or broke local debugging.

Eventually found a solution that allowed my app to run in VS2022 IDE, start browser (Chrome) by default, and still allow local debugging. Sharing what worked in my case, for anyone else searching later for a solution that doesn't break local debugging....

This was specifically for a Blazor Web Assembly project ; which was being setup to deploy to a self hosted IIS environment as a Sub-Application (ie, a subsite, or not on the root site)- which required other configuration changes as well to make it run locally again (steps 1 and 2); then some part of those changes created the "debugger" issue... step 3 is what specifically fixed the debugger issue, but I'm listing steps 1 and 2 as well in case they had hidden meaning to the issue at hand....

In file Properties/launchSettings.json, for your launch profile(s):

  1. Add property “commandLineArgs” to include the updated base path for your project, without trailing slash:
    "commandLineArgs": "--pathbase=/WASMTestProj",

  2. Add 2nd property “launchUrl” to include the updated project name, without any slashes:
    "launchUrl": "WASMTestProj

  3. In launchSettings.json , update the inspectUri value to also include your project name
    "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/WASMTestProj/_framework/debug/ws-proxy?browser={browserInspectUri}"

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Michael