Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Support inspecting large data structures without timeouts on 4.x versions of node.js #11

Closed
weinand opened this issue Dec 1, 2015 · 14 comments

Comments

@weinand
Copy link
Contributor

weinand commented Dec 1, 2015

Inspecting large data structures results in slowness (unresponsiveness) issues in node >= 3.x.

The problem is the node debugger protocol which does not provide a way to access arrays or dicts in chunks. Always the full thing travels over the wire. A particular nasty issue is that local variables are included in the stack frame object even if nobody requested them. A consequence is that stepping through code with large arrays, Buffers, or dicts in local variables results in slowness and timeouts.

Up to node 0.12.x we did some code injection into the debugger to work around these issues and they were quite effective. If possible, just try to use node 0.12.9 and you will notice the difference.

For node 4.x and 5.x we haven't figured out how to do the same trick, but we are working on it.

@winsome
Copy link

winsome commented Mar 1, 2016

Was redirected here from #38 since it's been closed. I'm debugging a pretty basic express app running on node 0.10.32 and seeing this unresponsiveness come up quite a bit. If I give it enough time, code eventually comes around and lets me continue debugging. Any tips or suggestions on what might help?

@weinand
Copy link
Contributor Author

weinand commented Mar 1, 2016

@winsome please try to upgrade to node v0.12.9 (but not higher).

@joewood
Copy link

joewood commented Mar 4, 2016

Seeing this problem a lot Code 0.10.8 without anything in the watch window. It seems to be a lot worse since the Feb update.

@maorhayoun
Copy link

same goes for 0.10.9, many cases of "cancelled because node is unresponsive"

@frogcjn
Copy link

frogcjn commented Sep 15, 2016

How can I avoid this? It makes me crazy.

@LH0702
Copy link

LH0702 commented Mar 7, 2017

update nodejs. I update nodejs to v7.7.1 seem to resolve this problem!

@jcuenod
Copy link

jcuenod commented Jun 3, 2017

I've still got this problem on v7.10.0

@weinand
Copy link
Contributor Author

weinand commented Jun 3, 2017

@jcuenod please use the new inspector protocol by setting the "protocol" attribute in your launch config to "inspector".

@Hemang77
Copy link

Hemang77 commented Feb 12, 2019

@weinand I tried to to do the same (put inspector as a protocol in launch.json file), but after that debugger won't start and giving message in debugger console as follows:
"Warning: This is an experimental feature and could change at any time."
if i put "auto" or "legacy" protocol, debugger will work but will give error of node.js is unresponsive at large response.
node - v6.10.1

@weinand
Copy link
Contributor Author

weinand commented Feb 12, 2019

@Hemang77 how does the resulting launch config look like?

@Hemang77
Copy link

Hemang77 commented Feb 12, 2019

@weinand

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "protocol": "inspector",
            "name": "Launch Program",
            "program": "${workspaceFolder}/server.js"
        }
    ]
}

it's look like this when I use inspector protocol but as I mentioned before,not working.

@weinand
Copy link
Contributor Author

weinand commented Feb 12, 2019

In which way isn't it working?
Please note: the message "Warning: This is an experimental feature and could change at any time." is expected and does not mean that something is wrong or not working.

@Hemang77
Copy link

@weinand
It worked,
There was some problem with third party extensions.
I've removed it!
apologies and Thank you for your time and help...!

@weinand
Copy link
Contributor Author

weinand commented Feb 12, 2019

@Hemang77 no problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants