12

Most of the time I can debug Node v4.2.1 projects in vscode perfectly but sometimes for no reason I can figure out Node becomes very slow to respond and I get messages like:

node did not respond to request to 'continue' in a reasonable amount of time

Does anyone have any idea what could be causing this and how to resolve it?

1

6 Answers 6

6

I've been coping with this too, what i've done was to modify a file on the debug connector to extend the timeout, I guess it's a problem with my computer speed or something. Anyways, here's what i've done:

1- Open and edit the file nodeV8Protocol.js located inside VSCodeApp folder:

/Visual Studio Code.app/Contents/Resources/app/extensions/node-debug/out/node

2- Search the line where is initialized near the end of the file: Replace the default, wich is:

NodeV8Protocol.TIMEOUT = 3000;

By, for example:

NodeV8Protocol.TIMEOUT = 10000;

3- Save the file, and reload Visual Studio Code.

Hope that helps

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, thats helpful but I'd really like to know what is causing it. I'm running an i7 MacBook Pro with plenty of free ram and CPU not doing much. Rebooting doesn't help either.
its a bug from VS(probably)..Even for me also it gave same error with high end PC. Thia solution is good
updated path considering it has been installed in the C drive , C:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\ms-vscode.node-debug\out\node
6

Try change 'node' to 'node2' in your launch config. Worked to me.

2 Comments

Amazing! I was extremely sceptical, but not only did this fix the "unresponsive" issue, it has dramatically improved debugging speed in my VSCode. Thanks!
For node version 6.3 or above, keep using node, but instead, add "protocol": "inspector" to your launch config. See my answer below.
4

Based on the suggestion from Alcionei-Estevam-Jr I've tried to use node2 in the launch configuration. It is no longer supported, however, but vscode kindly suggested to use node (as it was), and add "protocol": "inspector", (it requires a node version 6.3 or higher, though). This has fixed the unresponsiveness of node, and now, I can debug happily again.

So my launch config now looks like: json { "version": "0.2.0", "configurations": [{ "type": "node", "protocol": "inspector", "request": "launch", "name": "Launch Program", "program": "${workspaceRoot}/src/index.ts", "outFiles": [ "${workspaceRoot}/dist/**/*.js" ] }] }

2 Comments

When I try this my debugger just stops with no error message when I hit debug
Apparently I had multiple versions of Node installed; I uninstalled all and reinstalled and now I'm fine.
2

I experienced the same issue. It started happening right after I upgraded to Node v4.2.4. I am running VSCode Version 0.10.6. I increased NodeV8Protocol.TIMEOUT but that didn't seem to fix it. I am on OSX 10.10.5.

I upgraded to Node.js v5.3.0 and that fixed it. Current stable version: v5.3.0 I used: npm install -g n then npm rebuild

Comments

0

Could be any number of things.

What kind of code are you running? Does this happen with very basic projects you sure aren't causing any memory leaks or leaving tasks running in the background?

Does this error happen when running the same code directly from the command line, outside of VS code?

2 Comments

It happens on many projects, most of which are fairly small express web apps, nothing large or complex about them. It happens at app startup after just a few seconds of running, I don't believe it is a memory leak, system memory/CPU is fine. It only happens when debugging, running from command line runs quickly as expected.
I am experiencing the exact same issue in debug mode (Windows 10, i7 16gb ram), tell me if you have found solutions about it.
0

Without seeing your code I would only be guessing and I am frankly guessing a bit in my situation as well, but in my specific case it seemed to be extra asynchronous load elsewhere in the application being prioritized higher than the debugger's own asynchronous interprocess communication.

In my specific case I was sending some real-time traffic via an open web socket to an external client. When the payloads were small everything was fine, but when I inadvertently increased the payload size to a few dozen kilobytes per send the service process seemed to get too busy to expediently respond to debug requests. When I got the payloads back down to a reasonable size (in my case a few hundred bytes) the debugger began responding in a timely fashion.

Whether this is an issue with node, the web socket library I was using, or Visual Studio Code, I can only guess; if altering the load and testing more discretely isn't an option for you the timeout increasing suggestions above worked for me (although the reason for the 3 second timeout is because waiting longer than that really sucks... the 8-12 seconds it was taking to step over code in my case was inconvenient enough to alter my other async load to speed things up).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.