Debug TS code directly without compiling typescript files
Configuration of launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Current TS File",
"type": "node",
"request": "launch",
"program": "/usr/local/bin/ts-node",
"args": [
"${workspaceRoot}/app.ts"
],
"cwd": "${workspaceRoot}",
"protocol": "inspector"
}
]
}
Among them, program is the installation location of ts-node, and args is the entry file path of the program