-
-
Notifications
You must be signed in to change notification settings - Fork 540
Exception not shown in VS Code if thrown after console.log() #638
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
Comments
Can you share your configuration? I’m not very familiar with this feature. |
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"runtimeArgs": [
"-r",
"ts-node/register"
],
"args": [
"${workspaceFolder}/test.ts"
]
}
]
} |
After debugging for a while, I've narrowed it down to this line which installs source map support. Commenting it out causes the exception to show properly. I've confirmed that this isn't a VS Code issue by trying the same thing in the Chromium debugger ( |
You might want to report the issue on that module. |
It is indeed a problem there. I'm curious why this library is needed in the first place though. The stack traces are correct for me without it. |
They aren’t for me, hence the addition. Are you looking at stack traces in the console or in VS code - I bet the inspector protocol does source code mapping for you. |
Hmm, you're right. |
Feel free to link the issue back to here so the others can track the progress if they run into the same issue 👍 |
I commented on the PR that introduced this issue - evanw/node-source-map-support#208. |
As a workaround, you can add |
The following code doesn't show an exception for me when debugging in VS Code:
Removing
console.log('')
causes the exception to appear in the Debug Console. The following also works fine:I'm using the VS Code launch configuration mentioned in the README.
node --version
:v10.6.0
code --version
:1.25.0
"ts-node": "^7.0.0"
The text was updated successfully, but these errors were encountered: