You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--inspect crash in Node >=14.0.0 when accessing global variable in devtools #36845
Run below test.js by using node --inspect=0.0.0.0:9229 test.js and inspect the file with chrome://inspect in Chrome (I am using Windows 10).
In the chrome dev tools try to access the "test" variable by typing test in the devtools. The node process will crash on the first try or on your next couple calls.
// test.jsfunctionregisterGlobals(objects){Object.keys(objects).forEach((key)=>{(globalThis)[key]=objects[key];});};vartest={blaat: 'some value'};registerGlobals({
test
});setInterval(()=>{console.log('hearthbeat');},1000);
How often does it reproduce? Is there a required condition?
It happends consistently after the first 1-5 tries when accessing the "test" global variable.
What is the expected behavior?
Not crash and return the results like in Node <= 13
What do you see instead?
node --inspect=0.0.0.0:9229 test
Debugger listening on ws://0.0.0.0:9229/e7de75b7-eb6f-4fee-a374-0666c9644a98
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
test
test
test
test
test
#
# Fatal error in , line 0
# Check failed: !isolate->has_pending_exception().
#
#
#
#FailureMessage Object: 0x7fffb56adfb0
1: 0xa96131 [node]
2: 0x19614f4 V8_Fatal(char const*, ...) [node]
3: 0xc191fa [node]
4: 0xc1c634 v8::internal::Builtin_ConsoleLog(int, unsigned long*, v8::internal::Isolate*) [node]
5: 0x13a6339 [node]
Illegal instruction (core dumped)
Additional information
This only started happenening since Node version 14.0.0. Before, in v13.14.0, this crash does not happen.
Node process crash happens even before we have hit Enter when devtools tries to evaluate a partial expression.
So we have found a workaround for this issue: turn off "eager evaluation" in chrome devtools:
I just had this issue. But instead of accessing variables, it happens to me whenever I have an array typed in the debugger and when it changes, it crashes. I have a WS array and whenever someone tries connecting, which adds to the array, node crashes if I have a line entered that references the array. If I wait for them to connect and then type the line, it doesn't crash. (tried node 16 and 15)
PS - If anyone has any alternative debugging module for node.js I'd love to hear it
I'm unable to reproduce this locally, and given that there's been no further discussion or activity on this in years, I'm going to go ahead and close the issue. It can be reopened if necessary.
Activity
targos commentedon Jan 8, 2021
I can reproduce. I'm preparing a debug build to get a better stack trace.
targos commentedon Jan 8, 2021
targos commentedon Jan 8, 2021
This only happens with the Chrome devtools. I cannot reproduce using
node inspect.targos commentedon Jan 8, 2021
@nodejs/inspector
oyyd commentedon Jan 14, 2021
The code below is simpler and could also reproduce:
node --inspect test.jsand typeprocessin Chrome Devtools.tinpotnick commentedon Feb 18, 2021
I am not sure if I am helping at all - but I just found this bug also. I am running node v14.15.4 on Fedora.
alex3d commentedon May 26, 2021
Node process crash happens even before we have hit

Enterwhen devtools tries to evaluate a partial expression.So we have found a workaround for this issue: turn off "eager evaluation" in chrome devtools:
SpeedyCraftah commentedon Jul 6, 2021
I just had this issue. But instead of accessing variables, it happens to me whenever I have an array typed in the debugger and when it changes, it crashes. I have a WS array and whenever someone tries connecting, which adds to the array, node crashes if I have a line entered that references the array. If I wait for them to connect and then type the line, it doesn't crash. (tried node 16 and 15)
PS - If anyone has any alternative debugging module for node.js I'd love to hear it
jespertheend commentedon Nov 20, 2021
I can no longer reproduce this as of node 16.6.0.
jasnell commentedon Jan 22, 2025
I'm unable to reproduce this locally, and given that there's been no further discussion or activity on this in years, I'm going to go ahead and close the issue. It can be reopened if necessary.