As now, in 2019, latest VSCode supporting async/await debug, just would like to share solution to prevent vscode to "Step into" (by f11) into async/await method through the "async_hooks.js" and "inspector_async_hook.js" files during debug nodejs applications.
Howto :
1) press ctrl+p in vscode and type ">launch", select "open launch.json"
2) after opening "launch.json", just add to configuration section :
"skipFiles": [
"inspector_async_hook.js",
"async_hooks.js"
]
or some more generic version :
"skipFiles": ["<node_internals>/**"]
So you final json should looks something like here:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}\index.js",
"skipFiles": ["<node_internals>/**"]
}
]
}
After these steps you can see your real async method after pressing F11 in debug mode.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…