microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.86k stars 29.51k forks source link

All breakpoints are unbound when starting debugging session (if I re-set them they work) #174761

Closed scureatcs closed 1 year ago

scureatcs commented 1 year ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

My folder structure is: app --.vscode --client <--- here's the code I'm trying to debug

If I put the .vscode dir directly in client, the breakpoints work when the debugging session starts. I don't have to re-set them.

launch.json config:

    {
      "name": "ng serve",
      "type": "chrome",
      "request": "launch",
      "preLaunchTask": "npm: start",
      "url": "https://localhost:4200/",
      "webRoot": "${workspaceFolder}/client", // <---- I thought this would let vscode know where my code is
    }

my task:

    {
      "type": "npm",
      "script": "start",
      "path": "client",
      "isBackground": true,
      "problemMatcher": {
        "owner": "typescript",
        "pattern": "$tsc",
        "background": {
          "activeOnStart": true,
          "beginsPattern": {
            "regexp": "(.*?)"
          },
          "endsPattern": {
            "regexp": "bundle generation complete"
          }
        }
      }
    }
scureatcs commented 1 year ago

Seems to be working after I added:

            "outFiles": [
                "${workspaceFolder}/client/dist/**/*.js"
            ]

To the config. Not sure I have to do this when I'm already specifying:

      "webRoot": "${workspaceFolder}/client"

Is this the correct solution?

connor4312 commented 1 year ago

/jsDebugLogs please :)

vscodenpa commented 1 year ago

Please collect trace logs using the following instructions:

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to connor@xbox.com

vscodenpa commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!