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

VSCode Javascript Debugger doesn't hit the breakpoint after few code changes #1803

Closed
middiu opened this issue Sep 14, 2023 · 12 comments · Fixed by #1850
Closed

VSCode Javascript Debugger doesn't hit the breakpoint after few code changes #1803

middiu opened this issue Sep 14, 2023 · 12 comments · Fixed by #1850
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@middiu
Copy link

middiu commented Sep 14, 2023

VSCode Javascript Debugger doesn't hit the breakpoint after few code chjanges.

Steps to Reproduce:

  1. Create a new ReactJS project
  2. Create a launch json file for setting the chrome debugger
  3. Start the browser, do a change in you editor, add a new line, add a breakpoint, save it(you might need to repeat this step for 2-3 times but usually reproduces after the first save)
  4. After the file is saved and the browser refreshes you will observe that your breakpoint will not hit anymore, seems to be a caching issue, after the browser will be restarted then the breakpoint will hit, the dev tools are showing the correct source code.
  5. This worked since a 2-3 weeks ago (I've been on away and didn't code for few weeks)

Other people are facing the issue it seems: microsoft/vscode#189863

Log File
vscode-debugadapter-affae410.json.gz

Version: 1.82.1 (user setup)
Commit: 6509174151d557a81c9d0b5f8a5a1e9274db5585
Date: 2023-09-08T08:45:05.575Z
Electron: 25.8.0
ElectronBuildId: 23503258
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19044

@middiu middiu added the bug Issue identified by VS Code Team member as probable bug label Sep 14, 2023
@middiu middiu changed the title VSCode Javascript Debugger doesn't hit the breakpoint after few code chjanges VSCode Javascript Debugger doesn't hit the breakpoint after few code changes Sep 14, 2023
@middiu
Copy link
Author

middiu commented Sep 18, 2023

Just updated to latest vs code and the issue is still there.
I also tried with latest Chrome version as well as Chromium, same problem.

Version: 1.82.2 (user setup)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:55:25.390Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19044

@middiu
Copy link
Author

middiu commented Sep 19, 2023

Tested on my Mac on a different ReactJS project and got the same problem, after few app changes the breakpoint is not hit:

Version: 1.82.2
Commit: microsoft/vscode@abd2f3d
Date: 2023-09-14T05:59:47.790Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 22.6.0

@connor4312 connor4312 mentioned this issue Sep 19, 2023
4 tasks
@CaidenKehrer
Copy link

I can second this issue

Version: 1.84.0-insider (user setup)
Commit: 901ac65ea9f906d6996ad8e7639ba81acecf1d7c
Date: 2023-10-12T05:37:35.298Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

Using
Angular 15.2.9

If there is any way I can help get this fixed it is a major slowdown for debugging any related issues.

@CaidenKehrer
Copy link

For anyone that is having an issue the same way I am. Here are the tests I ran.
I tested it on edge and chrome.
I ran ng serve with the source map enabled.
I verified that my configuration included source maps.
I ran with trace enabled and tried to see if any issue arose in the console.

Preface warning: I am not recommending that people do this.
The only fix I found was disabling this extension, going to the deprecated Debugger for chrome extension, and installing the vsdx manually. Then configuring it to use that as the debugger. I will be using the deprecated chrome debugger extension until this is fixed. (I am willing to reinstall the js-debug extension if help is needed solving this issue)

@connor4312
Copy link
Member

Please try the next nightly build after 5PM PST today for the fix.

Not sure why this just came up, this should have been a problem for the last couple years since we added sourcemap caching 🤔

@ctgbarcalow
Copy link

ctgbarcalow commented Oct 23, 2023

I'm running the nightly build and the issue does not seem to be resolved.
Correction, the continued issue was my fault. I failed to adequately disable the built-in debugger.
https://github.com/microsoft/vscode-js-debug#nightly-extension

@connor4312
Copy link
Member

connor4312 commented Oct 23, 2023

You likely have a different problem that the one reported in this issue. Please create a new issue.

@alexr00 alexr00 added verification-steps-needed Steps to verify are needed for verification and removed verification-steps-needed Steps to verify are needed for verification labels Oct 26, 2023
@alexr00
Copy link
Member

alexr00 commented Oct 26, 2023

@connor4312 what's the best way to verify this? I can't repro the original issue with the built in js-debug extension.

@alexr00 alexr00 added the verification-steps-needed Steps to verify are needed for verification label Oct 26, 2023
@connor4312
Copy link
Member

THis is a bit finicky to try to repro. I think we can consider this author-verified by people who had the same problem in a duplicated issue: microsoft/vscode#189863 (comment)

@connor4312 connor4312 added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Oct 26, 2023
@rainscha
Copy link

rainscha commented Nov 6, 2023

I have the same Problem.
VSC-Version: 1.84.0

Project: Angular 15

  • Start debugging --> everything is ok.
  • Make some typescript code changes.
  • Angular recompile, Browser reload
  • Breakpoints are somewhere but not correct.

@nicorac
Copy link

nicorac commented Nov 6, 2023

I have the same Problem.

Maybe you did the same "errors" than me (here and here):

  • are "typescript code changes" real code changes? I mean, aren't you only adding empty lines/whitespaces/unused code? Since change detection is done on compiled code, so there must be real changes...
  • check that you don't have both JavaScript Debugger and JavaScript Debugger (Nightly) extensions enabled together

Just my 2c 😉

@rainscha
Copy link

rainscha commented Nov 6, 2023

Yes real changes and i use just javascript debugger.
The Problem comes with an update of vsCode. I will not remember the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants