I have looked everywhere and I still have issue debugging TypeScript inside VS Code. I have read this thread but still I am not able to hit my breakpoints placed inside a Ty
None of the other answers worked for me.
I then realised the program
attribute in my launch.json
was pointing to the .js
file, but my project is a TypeScript project.
I changed it to point to the TypeScript (.ts
) file, and set the outFiles
attribute to point to where the compiled code lives:
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/src/server/Server.ts",
"cwd": "${workspaceRoot}",
"outFiles": ["${workspaceRoot}/dist/**/*.js"]
}
This solved the issue for me!