-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
Debugger not working properly, breakpoints won't trigger #5422
Comments
@TomL94 are you launching the server through VS Code or are you attaching to a running server? I could not reproduce your problem on Windows 10, but I'm not sure that I understand your second parameter 'upload' to 'router.post'. I left it out and everything was working fine for me. The message 'waiting for debug protocol on stdin/stdout' is normal and occurs at the start of every debug session. |
@weinand I'm having the same issue. My breakpoints in nodejs get reached, the execution stops but I don't see anything in the debugger window (but if I press F5 the execution continues). Strangely, when the code throws an exception and the debugger is set to capture all uncaught exceptions I can see the variables, call stack. etc. This has also happened to other teammates in different times and versions but we've never found out how to reproduce it consistently (although once it happens doesn't seem to get fixed). I'm currently running node 5.11.0 (was also happening with 5.10.1), Windows 10 14316 and the latest stable and insider versions of vs code (happens in both). My alias is antonmo in case you want more information over Skype or follow up internally to get more info. Thanks! |
VSCode version: 1.0.0 There are some weird conditions for this behavior that I've come across. I can recreate in every version of Node when trying to launch or attach my big app that uses Express's router: I then tried the Express 'Hello World' sample located here: Everything worked fine when debugging via launch or attach except for when I tried using Node 6.0.0 - then I observed the issue again. It's like it's hitting the breakpoint, but there is no visual indication in VSCode that it has done so, and watches/evaluations/stack don't have access to any of the expected objects. |
@rhurkes i have same issue with vscode (1.0) and node v6. |
@rhurkes So i unstalled node v6 and installed node-v5.11.0 and it works again. So issue is related to vscode 1.0 and node v6. |
Same issue as @rhurkes for me in express app. It now works with node v4.4.3 but not in v6 Debugger works on stopOnEntry but not in node/express handlers. |
@psulek I'm runing node 5.11 and I'm having the same issue with the insider and the stable (and I had randomly for quite a few versions of vscode and node now). |
i have same problem |
VS Code 1.0 does not yet support node v6. |
I'm experiencing this in node 4.4.3, I'll report back with more details shortly. Update: nothing in the developer console. Also, I am attaching to the process via |
For anyone seeing issues in places besides node 6.0, verify that nvm (or similar) isn't confusing things. I had to use launch.json's runtimeExecutable setting to get node 4.4.3 working with nvm while node 6 was installed as an OS package. |
@rhurkes I am attaching to the process in this case, so I don't specify a Here is the stacktrace of an error I get when I attach to the process. I'm unsure if this is the underlying issue or not..
|
i had same problem. but I had resolved this problem.
this point is
Step
that's all |
I had this issue, but this was due to some breakpoints being applied within the Node.JS source code, when I removed those breakpoints everything worked fine. |
I had this issue, but I was using node 7.4.0. When I switched back to node 6.9, everything worked as expected (I had to set |
@BoogalooJB VS Code uses the 'node' executable found via the PATH environment variable. If you manage node versions with nvm, you have to restart VS Code because otherwise it does not see updated environment variables. (But your approach will work too). |
FWIW I was seeing this same issue in a node app written in TS and called from an external Test module (also coded in TS) - no express used. Previously I had it set to Question: "outDir" is saying its deprecated, what should it be replaced with? |
@GordonSmith please use "outFiles", more details https://code.visualstudio.com/updates/v1_6#_glob-pattern-support-for-source-map-setup |
I am having this problem now. I am not sure if this started with the release of v1.9.0 or v1.9.1. I was definitely debugging with breakpoints in v1.8.x. Not sure how to solve this issue. I am using gulp, I don't know if that makes a difference for debugging as I am using the given configuration from vscode's debug configuration.
Edit: I was able to debug with the following addition to
|
{ "restart": true } was the secret sauce for me, too. |
The debugger stopped working again and I did a little bit more digging. I found that the protocol using inspector to fix the situation (
However, even with this change the gulp tasks are not working. |
Since there are so many "me too" reports piggy-backed on this issue, I can no longer follow them in details and I'm closing the issue. If you still experience your problem in VS Code 1.11.0, please create a new issue with detailed steps. |
I just ran into this issue. Another solution to try, future reader: For me, it ended up being that I hadn't properly capitalized a letter in my require statement. Breakpoints in the test worked fine but not in the required file. It ran the code, even with the messed up caps, but didn't stop at the breakpoint. |
"Since there are so many "me too" reports piggy-backed on this issue, I can no longer follow them in details and I'm closing the issue." That's an option? Doesn't the number of me too comments indicate that this is a serious problem that is very much not resolved? |
No, most of the "me too"s are unrelated to the original issue and should have been filed as separate issues. If you have another "me too" please file a new issue and we will investigate. I'm locking this issue now. |
I'm working on a node.js project, using express.
I created the following POST route:
Putted a breakpoint in the cb function of the route. When it arrives there, the program stops, but the breakpoint won't "trigger", VSCode looks like the server just runs as usual.
When the breakpoint isn't there - the program runs as it supposed to.
I opened the developer console, and when it supposedly reaches that breakpoint (again, not showing that the program stopped or anything) it prints to the console:
The same problem occurs on every post route so I can't debug them at all, but not on get routes (tried only get and post).
The text was updated successfully, but these errors were encountered: