“Unverified breakpoint” in Visual Studio Code with Chrome Debugger extension

后端 未结 25 1977
太阳男子
太阳男子 2020-12-13 01:51

I am trying to debug my Typescript code in Visual Studio Code, using the Chrome Debugger extension, but I am getting the \"Unverified breakpoint\" message on my breakpoint,

相关标签:
25条回答
  • 2020-12-13 02:18

    In my case I had to define the sourceMapPathOverrides value like this:

    File launch.json (contained in .vscode folder):

    {
      // Use IntelliSense to learn about possible attributes.
      // Hover to view descriptions of existing attributes.
      // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
      "version": "0.2.0",
      "configurations": [
        {
          "type": "chrome",
          "request": "launch",
          "name": "Launch Chrome against localhost",
          "url": "http://localhost:3000",
          "webRoot": "${workspaceFolder}",
          "sourceMaps": true,
          "smartStep": true,
          "internalConsoleOptions": "openOnSessionStart",
          "sourceMapPathOverrides": {
            "webpack:///*": "${webRoot}/project/app/*"
          }
        }
      ]
    }
    

    My source is in ${workspaceFolder}/project/app.

    0 讨论(0)
提交回复
热议问题