-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Chrome debugger for node doesn't work properly #33002
Comments
What steps will reproduce the bug?Same as above ( try to inspect anything in chrome debugger e.g. object ) How often does it reproduce? Is there a required condition?It consistently happens after updating node to version v14.0.0 What is the expected behavior?Output is immediately shown pressing enter in the chrome devtools. What do you see instead?There is no output shown for a while. Then output appears. Additional informationVersion 81.0.4044.122 (Official Build) (64-bit) When i stopped on a breakpoint and then i type in debugger console everything works fine. As soon as I resume code execution in debugger and then I try to type in console it freezes for a few seconds again. My code
Problem seems to not occur when inspecting in terminal |
/cc @nodejs/inspector |
I’ve confirmed that this was caused by #32523. This would fix the “not seeing any response” problem: diff --git a/src/env.cc b/src/env.cc
index 3efa5c3b9c98..28dd4ceea3e3 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -737,6 +737,9 @@ void Environment::RunAndClearInterrupts() {
void Environment::RunAndClearNativeImmediates(bool only_refed) {
TraceEventScope trace_scope(TRACING_CATEGORY_NODE1(environment),
"RunAndClearNativeImmediates", this);
+ HandleScope handle_scope(isolate_);
+ InternalCallbackScope cb_scope(this, Object::New(isolate_), { 0, 0 });
+
size_t ref_count = 0;
// Handle interrupts first. These functions are not allowed to throw However, I’m additionally seeing a segmentation fault inside V8 here occasionally that I’d like to investigate. |
I too am experiencing this issue with
Steps to reproducenode --inspect -p 'setInterval(Function, 1 << 30)'
You'll notice while typing |
Can also confirm that I'm seeing the same issue when using NiM https://chrome.google.com/webstore/detail/nodejs-v8-inspector-manag/gnhhdgbaldcilmgcpfddgdbkhjohddkj, and I'm using all DevTools versions, build in, appspot, and june07 hosted devtools instances: |
This ensures that microtasks scheduled by native immediates are run after the tasks are done. In particular, this affects the inspector integration since 6f9f546. Fixes: nodejs#33002 Refs: nodejs#32523
This ensures that microtasks scheduled by native immediates are run after the tasks are done. In particular, this affects the inspector integration since 6f9f546. Fixes: #33002 Refs: #32523 PR-URL: #34366 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This ensures that microtasks scheduled by native immediates are run after the tasks are done. In particular, this affects the inspector integration since 6f9f546. Fixes: #33002 Refs: #32523 PR-URL: #34366 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This ensures that microtasks scheduled by native immediates are run after the tasks are done. In particular, this affects the inspector integration since 6f9f546. Fixes: nodejs#33002 Refs: nodejs#32523 PR-URL: nodejs#34366 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This ensures that microtasks scheduled by native immediates are run after the tasks are done. In particular, this affects the inspector integration since 6f9f546. Fixes: #33002 Refs: #32523 Backport-PR-URL: #35241 PR-URL: #34366 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Linux my-computer 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
What steps will reproduce the bug?
node --inspect
to start the debugger in a REPL.1+1
).How often does it reproduce? Is there a required condition?
It consistently happens for v14.0.0 but not for v13.13.0 or any prior version.
What is the expected behavior?
Output is immediately shown pressing enter in the chrome devtools.
What do you see instead?
The statement is executed but no output is shown until you open up the running node instance and hit enter in the REPL itself. For example, if you run
console.log("foo")
in the chrome devtools, you can see that "foo" is logged to both devtools and the node REPL. However, if you run1+1
, the return value2
is not displayed on the devtools until you hit enter in the node REPL.Additional information
My chrome version is
84.0.4115.5 (Official Build) dev (64-bit)
.The text was updated successfully, but these errors were encountered: