Debug Typescript with VSCode
Typescript Debugging using Visual Studio Code and ts-node
Updated: 03 September 2023
It’s possible to debuge any TS file without compiling using ts-node
from VSCode
First, init a new npm project with typescript (normally you should already have one):
Now - time to start: install ts-node
:
Next, create a .ts
file to debug, e.g:
log.ts
Then create a .vscode/launch.json
file:
.vscode/launch.json
And that’s about it, you should be able to use the debug config on whatever TS file you’re looking at without any added effort