Skip to content
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

Support inspecting large data structures on 4.x and 5.x versions of node.js #4951

Closed
3 tasks done
weinand opened this issue Apr 5, 2016 · 9 comments
Closed
3 tasks done

Comments

@weinand
Copy link
Contributor

weinand commented Apr 5, 2016

test item for microsoft/vscode-node-debug#11:

Inspecting large data structures results in slowness (unresponsiveness) issues in node.js because the v8 debugger protocol does not provide a way to access large data structures 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 "for free" even if nobody requested them. A consequence is that stepping through code with large arrays or buffers in local variables or parameters results in slowness and timeouts.

In node 0.12.x VS Code started to dynamically inject code into the node runtime to improve the v8 debugging protocol but this stopped working after the io.js/node.js reunion for 2.x and 3.x versions. After fix nodejs/node#4328 code injection started to work again in node.js 4.3.1 in the LTS stream. For the 5.x stable stream the code injection has to use a slightly different approach that started to work in node 5.6.

Verify for node.js >= 4.3.1 and node.js >= 5.6 that:

  • you can inspect large (~ 100000) arrays and buffers without node.js becoming unresponsive

Please note: this feature is not about objects with many properties. Objects with many properties will be addressed in microsoft/vscode-node-debug#18.

@weinand weinand added this to the April 2016 milestone Apr 5, 2016
@egamma egamma mentioned this issue Apr 5, 2016
68 tasks
@joewood
Copy link

joewood commented Apr 20, 2016

The debugger for node is pretty much unusable right now. Will this be fixed any time soon? This is using node 4.4.2. VS Code 1.0. I don't see this related to large data structures, I see this when stepping any code, nothing in the watch window.

@weinand
Copy link
Contributor Author

weinand commented Apr 20, 2016

@joewood could you please try to debug the same code with node-inspector?

@weinand
Copy link
Contributor Author

weinand commented Apr 20, 2016

@joewood since you are the first who reports that node debug "is unusable in VS Code 1.0" it cannot be a wide spread issue. Could you please share some details about your problem so that we can investigate.

Since this issue is a test plan item of a feature that will be available in the April release, it would be great if you could file a proper bug against the 1.0 release.

@weinand
Copy link
Contributor Author

weinand commented Apr 22, 2016

@joewood thanks for your investigation.
Since this is a test plan item which is unrelated to your problem, I do not want to confuse the test of a new feature unnecessarily and I have moved your comment to #5645.
I think it is good practice to only comment on test plan items, if you are involved in the test of the specific feature.

@kieferrm
Copy link
Member

I tested with 5'000'000 items in an array on node v4.4.3 and node v5.9.1. It works beautifully. Even expanding the array in the variables view worked without issues (and nice progress icon).

@joewood
Copy link

joewood commented Apr 26, 2016

I think arrays are fine, did you try an object?

@kieferrm
Copy link
Member

@joewood I tried your test case from #5645. Stopping on a break point is reasonably fast although no data is presented (I'm guessing that is when the timeout is happening.) Using Step Over next fails immediately.

screen shot 2016-04-26 at 5 57 17 pm

@weinand
Copy link
Contributor Author

weinand commented Apr 27, 2016

@joewood @kieferrm this feature is not about objects with many properties. Objects with many properties will be addressed in microsoft/vscode-node-debug#18.

@kieferrm
Copy link
Member

@weinand thanks for clarifying.

@vsccarl vsccarl closed this as completed Apr 27, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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

4 participants