-
Notifications
You must be signed in to change notification settings - Fork 30k
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 can't be set by a debugger (Chrome or VS Code) while the Node program is running #11589
Comments
/cc @nodejs/v8-inspector |
I have a fix for this, but it is on top of #11431 - let me refactor it to a standalone one. |
I see some odd behavior with 8.1.2 - breakpoint works inside the function but not if I put at the callsite. Stack looks fine. Might be something in V8, I am investigating. This may be different from what VS Code hit. |
I reproduced this in Chrome so it seems to be an issue in the V8. I opened Chrome bug https://bugs.chromium.org/p/chromium/issues/detail?id=735091 - please let me know if this looks similar to what you are seeing in VS code. |
This issue just started appearing this week (or last?). Maybe after a VS Code upgrade? |
I tried to reproduce this issue with dedicated frontend from current stable Chrome, from latest dev Chrome and using ndb with node 8.11 and node 10.11. It looks like it works. Could you provide repro steps? |
Oho, so you think I should install ndb? I use node 10.5.0. While I'm at it (I know it's unrelated), are there ways to edit code while debugging, and run the updated code without restarting the app? WebStorm managed to do it, but I'm unsure if VS Code can. |
@nicothed you are probably having an issue with debugging in VS Code, not node. If you file an issue on the vscode repo with more details, I can try to help you. |
i deleted node_modules folder and package-lock.json, and do npm install. After that my debugger works like a charm for node and for chrome (breakpoints work) |
Setting breakpoints while the js-program is running doesn't seem to work from neither Chrome DevTools nor VS Code. The issue seems to be that the debugger calls node, and node receives and process the request, but doesn't sends the respond right away (which is what both debuggers expect). I tested this also against node 6.9.5 and the response is sent right away.
Chrome dev tools call:
{"id":14,"method":"Debugger.getPossibleBreakpoints","params":{"start":{"scriptId":"61","lineNumber":16,"columnNumber":0},"end":{"scriptId":"61","lineNumber":17,"columnNumber":0}}}
VS Code calls:
{ "id": 12, "method": "Debugger.setBreakpointByUrl", "params": { "urlRegex": "<my_path>\app\\.js", "lineNumber": 31, "columnNumber": 0 } }
The response seems to appear the next time that a breakpoint is hit or some console output is printed (I'm not exactly sure)
Following is the test program I used to reproduce this issue.
The text was updated successfully, but these errors were encountered: