reactjsasp.net-corevisual-studio-code

ASP.NET Core and React debug front in VSCode


Previously, I created front-end projects separately from the back-end. I decided to create an ASP.NET Core + React project and encountered this problem. I want to develop and debug the project in VS Code. But unfortunately, I discovered that breakpoints, when triggered, simply hang the page in the browser and do not pass anything to the VS Code itself. How to configure a project to achieve work with VS Code?

Default configuration of launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "localhost (Chrome)",
      "url": "https://localhost:5173",
      "webRoot": "${workspaceFolder}"
    }
  ]
}

Solution

  • My introduction to vite was caught in a problematic VScode build.

    This is problem with 1.95 October update of VScode, downgrade to 1.94 solve problem

    Commit vscode-js-debug