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
Debugging v8.5 - always pauses in async_hooks.js on promise rejection #15464
When I debug it in Chrome Devtools or VS Code, even when it's set to not break on exceptions, it pauses on function emitDestroyScript(asyncId) {... in async_hook.js after the promise is rejected.
This also reproes in Node 8.6. Is anyone looking into this? Seems to be affecting quite a few people.
If anyone is dealing with this in VS Code, there is a workaround - add
"skipFiles": [
"<node_internals>/**"
],
to your launch config to skip over this file automatically.
Reacted by Akio, Andrew Throener, Artem, Daniel Larsen, Paulo Cesar, Martin Bučko, Maxime Dupré, Connor Bär, Matt Morgis, Seth Westphal and 65 more
Reacted by Matt Forster, Dom Busser, burak, Asad Ali, wallaceturner, reyou, jamie-pate, Ville Venäläinen, Formica, Svetlozar Argirov and 5 more
Reacted by reyou, Michael Kintzer, Ivan E. Sanchez, Ogun, Rob Stanford, Formica, Nathan Lindorff, Svetlozar Argirov, Adrien Becchis, Mateus Henrique Calza and 3 more
Month ago I was good with "skipFiles": ["${workspaceFolder}/node_modules/**/*.js", "<node_internals>/**"]
But today I tried to step into await function and found myself in async_hooks.js...
I'm on vscode 1.47.3 and having this issue too. I can see that some have commented about this issue like 4/5 days ago so it must be something to do with recent updates? hmm
I also started having this happen after a recent VS code update. I thought it had to do with the config of a new project I was working on, but I went back to one that worked a couple months ago and it is experiencing the same thing. I believe skipFiles no longer respects <node_internals>
For those that are landing on this page because skipFiles no longer works with node_internals, I can verify that these steps: https://github.com/microsoft/vscode-js-debug#nightly-extension
fixes it. You're essentially switching to the nightly build of the debugger. Presumably this will only be necessary until they update the live debugger.
I'm using VS Code Insiders via Remote WSL, and I've tried every suggestion in this thread, including many combinations of skipFiles in my launch config as well as switching to the nightly build of the debugger, but I'm still having this issue. microsoft/vscode-js-debug#1085 (as mentioned in #36022) doesn't seem to have fixed it. I'm still brought into "internal\async_hooks" every time I debug. Aside from using an older version of Node (I'm on 16.x), is there a solution for this?
Was looking through the issue tracker for the thing fixed by #57148 because I figured I can't be the only one noticing it. I think people reporting after #16053 (which closed this issue) landed was probably seeing another issue coming from the unnecessary promise hooks unconditionally enabled through inspector async hooks. #57148 may fix at least some cases where the async hooks show up surprisingly.
Activity
TheAkio commentedon Sep 19, 2017
Seeing the same issue
kokeksibir commentedon Sep 20, 2017
Same issue here while debuging with WebStorm 2017.2.4
eugeneo commentedon Sep 20, 2017
CC: @ak239
gunins commentedon Sep 20, 2017
Same issue here while debuging with WebStorm 2017.2.4
benjamingr commentedon Sep 20, 2017
cc @addaleax
jpike88 commentedon Sep 28, 2017
This is driving me absolutely mental. Anyone got any ideas?
roblourens commentedon Sep 28, 2017
This also reproes in Node 8.6. Is anyone looking into this? Seems to be affecting quite a few people.
If anyone is dealing with this in VS Code, there is a workaround - add
to your launch config to skip over this file automatically.
Jeff-Li-Realster commentedon Sep 29, 2017
@roblourens After I added the "skipFiles" to config, it starts to pause on this line every time:
nanshakov commentedon Sep 29, 2017
and in Visual Studio current, not try fix
TheAkio commentedon Sep 29, 2017
For me the quick fix works on Node 8.6 with latest VSCode on Ubuntu 17.04
maximilianschmid commentedon Oct 2, 2017
Same issue here while debugging NodeJS 8.6 with WebStorm 2017.2.4 on MacOS 10.13
37 remaining items
Leigh-M commentedon Jul 23, 2020
Yeah mine's the same.. still stopping on <node_internals> despite being correctly included in the skipFiles launch config
DTX-92 commentedon Jul 24, 2020
Month ago I was good with
"skipFiles": ["${workspaceFolder}/node_modules/**/*.js", "<node_internals>/**"]But today I tried to step into await function and found myself in async_hooks.js...
zaidrashid commentedon Jul 28, 2020
I'm on vscode 1.47.3 and having this issue too. I can see that some have commented about this issue like 4/5 days ago so it must be something to do with recent updates? hmm
Droppix commentedon Jul 29, 2020
same issue...
DillonSadofsky commentedon Jul 30, 2020
I also started having this happen after a recent VS code update. I thought it had to do with the config of a new project I was working on, but I went back to one that worked a couple months ago and it is experiencing the same thing. I believe skipFiles no longer respects <node_internals>
Leigh-M commentedon Jul 30, 2020
Yes, I've had to manually skip all of those files (even though they're under <node_internals> which no longer works!) with this:
Very annoying but it works in the short term..
bernardolk commentedon Jul 31, 2020
I can confirm this issue. <node_internals> is not working on skipFiles
DillonSadofsky commentedon Jul 31, 2020
For those that are landing on this page because skipFiles no longer works with node_internals, I can verify that these steps:
https://github.com/microsoft/vscode-js-debug#nightly-extension
fixes it. You're essentially switching to the nightly build of the debugger. Presumably this will only be necessary until they update the live debugger.
katlimruiz commentedon Aug 14, 2020
Yes, it was working with the skipFiles for very long, and suddenly it stoppped working.
I usually did this
I just tried it with the solution above and it can be solved with this too, at least for me it is enough
lokhandechetan commentedon Aug 17, 2020
Following workaround worked for me.
Replace '<' and '>' with * (star) in the following,
"<node_internals>/**/*.js",
Looks like there is an issue with recognizing '<>' .
Give it a try.
bendavis78 commentedon Jan 10, 2021
How do you fix this without vsCode when running node via commandline?
quantuminformation commentedon Apr 23, 2021
Lol how is this still and issue when debugging with chrome?
fabioespinosa commentedon May 25, 2021
For those struggling with the VS code debugger, this config helped (along with the skipFiles):
"runtimeVersion": "14.9.0",Apparently it is broken in Node v15
algotastic commentedon Jun 29, 2022
I'm using VS Code Insiders via Remote WSL, and I've tried every suggestion in this thread, including many combinations of
skipFilesin my launch config as well as switching to the nightly build of the debugger, but I'm still having this issue. microsoft/vscode-js-debug#1085 (as mentioned in #36022) doesn't seem to have fixed it. I'm still brought into "internal\async_hooks" every time I debug. Aside from using an older version of Node (I'm on 16.x), is there a solution for this?joyeecheung commentedon Feb 20, 2025
Was looking through the issue tracker for the thing fixed by #57148 because I figured I can't be the only one noticing it. I think people reporting after #16053 (which closed this issue) landed was probably seeing another issue coming from the unnecessary promise hooks unconditionally enabled through inspector async hooks. #57148 may fix at least some cases where the async hooks show up surprisingly.