-
Notifications
You must be signed in to change notification settings - Fork 97
Support inspecting large data structures without timeouts on 4.x versions of node.js #11
Comments
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? |
@winsome please try to upgrade to node v0.12.9 (but not higher). |
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. |
same goes for 0.10.9, many cases of "cancelled because node is unresponsive" |
How can I avoid this? It makes me crazy. |
update nodejs. I update nodejs to v7.7.1 seem to resolve this problem! |
I've still got this problem on v7.10.0 |
@jcuenod please use the new inspector protocol by setting the "protocol" attribute in your launch config to "inspector". |
@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: |
@Hemang77 how does the resulting launch config look like? |
{
// 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. |
In which way isn't it working? |
@weinand |
@Hemang77 no problem. |
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.
The text was updated successfully, but these errors were encountered: