I'm trying to debug a service I wrote in typescript with vscode.
Up until now, I did not have any issues debugging, when I ran the debugger, it would debug via the typescript files.
But now when I run the service and debug, it takes me to the javascript compiled files, which makes debugging practically impossible.
This is the debugging configuration I use:
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/main.ts",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
}
I also tried running without preLaunchTask
& outFiles
but the result is the same.
Please advise on how can I properly debug the code.
question from:
https://stackoverflow.com/questions/66046806/vscode-debugging-typescript-leads-to-js-files 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…