Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakpoints not binding on typescript project on one machine #194988

Closed
disambiguationuk opened this issue Oct 6, 2023 · 9 comments · Fixed by microsoft/vscode-js-debug#1833
Closed
Assignees
Labels
candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded

Comments

@disambiguationuk
Copy link

disambiguationuk commented Oct 6, 2023

Hello, I'm having a bit of an issue with a project where none of my breakpoints want to bind to my react typescript application. I've got the exact same setup on a different machine and it works fine there. I've rebooted, reinstalled vs code etc. and no dice.

Running:
VS Code: Version 1.83.0
OS: Linux x64 6.2.0-34-generic (Ubuntu)
Chromium: 114.0.5735.289

My launch.json looks like:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:8000/login",
      "trace": true,
      "webRoot": "${workspaceFolder}/browser"
    }
  ]
}

And I've got a debug trace file:
vscode-debugadapter-8ffee509.json.gz

@kbeeveer46
Copy link

kbeeveer46 commented Oct 6, 2023

I have this same issue in a React +TypeScript project. Tried restarting my computer and VS Code but nothing works. I can't get any of my breakpoints to work. I think the only difference from the other day when it worked fine was installing 1.83.0. My next step is to uninstall 1.83 and install the previous version and see if that works.

I'm using the SharePoint Framework (SPFx) with React and TypeScript and this is my launch file

 {
            "name": "Chrome Hosted workbench",
            "type": "chrome",
            "request": "launch",
            "url": "https://xxxxxxxx.sharepoint.com/sites/ClientPortalQA/_layouts/15/workbench.aspx?debug=true&noredir=true&debugManifestsFile=https://localhost:4321/temp/manifests.js",
            "webRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "sourceMapPathOverrides": {
                "webpack:///.././src/*": "${webRoot}/src/*",
                "webpack:///../../../src/*": "${webRoot}/src/*",
                "webpack:///../../../../src/*": "${webRoot}/src/*",
                "webpack:///../../../../../src/*": "${webRoot}/src/*"
            },
            "runtimeArgs": [
                "--remote-debugging-port=9222"
            ],
            "skipFiles": [
                "<node_internals>/**",
                "${webRoot}/node_modules/**/*.js"
            ],
            "resolveSourceMapLocations": [
                "${workspaceFolder}/**",
                "!**/node_modules/**"
            ]
        }

@kbeeveer46
Copy link

kbeeveer46 commented Oct 6, 2023

Uninstalling 1.83 and installing 1.82.3 fixed my breakpoints issue.

Download link for 1.82.3: https://code.visualstudio.com/updates/v1_82

@disambiguationuk
Copy link
Author

Hmm weird, I think my laptop is on the latest and it's working but I don't have it in front of my right now. I'll give it a go.

@disambiguationuk
Copy link
Author

Ah it works! Well that was a waste of productivity this week!

@roblourens roblourens assigned connor4312 and unassigned roblourens Oct 6, 2023
@connor4312
Copy link
Member

connor4312 commented Oct 6, 2023

It looks like this is a regression with the webpack eval-* devtool settings. I will put in a fix for the next nightly build of the debugger.

Btw, I recommend setting your devtool to just source-map if reasonable, or at least avoiding eval-* source maps. Due to the way they're structured, they can be slower to load for the debugger than other maps.

connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Oct 6, 2023
V8 does not resolve URL-set breakpoints when the script in question only
has that URL via a sourceURL mapping.

I also noticed an issue with per-script entrypoint breakpoints where
another file with the same name, or part of the same name, could
incorrectly remove the entrypoint breakpoint early. It's fine to just
leave the breakpoint around -- can be slightly slower, but better than
missing the breakpoint entirely.

Fixes microsoft/vscode#194988
@connor4312 connor4312 added the candidate Issue identified as probable candidate for fixing in the next release label Oct 6, 2023
@connor4312 connor4312 added this to the September 2023 Recovery 1 milestone Oct 6, 2023
@connor4312
Copy link
Member

I'll also put this forward as a candidate for our 1.83.1 recovery release

connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Oct 6, 2023
V8 does not resolve URL-set breakpoints when the script in question only
has that URL via a sourceURL mapping.

For  microsoft/vscode#194988
connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Oct 6, 2023
* fix: eval webpack config breakpoints not setting

V8 does not resolve URL-set breakpoints when the script in question only
has that URL via a sourceURL mapping.

I also noticed an issue with per-script entrypoint breakpoints where
another file with the same name, or part of the same name, could
incorrectly remove the entrypoint breakpoint early. It's fine to just
leave the breakpoint around -- can be slightly slower, but better than
missing the breakpoint entirely.

Fixes microsoft/vscode#194988

* fix: don't use entry bps in breakpoint reason calculation

* fix test
connor4312 added a commit that referenced this issue Oct 6, 2023
connor4312 added a commit that referenced this issue Oct 6, 2023
connor4312 added a commit that referenced this issue Oct 6, 2023
connor4312 added a commit that referenced this issue Oct 6, 2023
@bhavyaus bhavyaus added the verified Verification succeeded label Oct 10, 2023
@disambiguationuk
Copy link
Author

Just noting this still appears to be broken in 1.83.1 for me.

@connor4312
Copy link
Member

Please collect a new trace log for me to investigate. Thanks!

@kbeeveer46
Copy link

I was one of the people having breakpoint issues in 1.83. I just tested 1.83.1 and my breakpoints work now.

Alex0007 pushed a commit to Alex0007/vscode that referenced this issue Oct 26, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants