Skip to content

Instantly share code, notes, and snippets.

@pedrovasconcellos
Created July 16, 2024 19:02
Show Gist options
  • Save pedrovasconcellos/eaf35729d4908631c808b24ebc5951b6 to your computer and use it in GitHub Desktop.
Save pedrovasconcellos/eaf35729d4908631c808b24ebc5951b6 to your computer and use it in GitHub Desktop.
Enable Typescript debug mode in vscode
{
"version": "0.2.0",
"configurations": [
{
"args": [],
"cwd": "${workspaceRoot}",
"env": {
"NODE_ENV": "development"
},
"name": "DEBUG",
"preLaunchTask": "compile",
"program": "${workspaceRoot}/src/index.ts",
"request": "launch",
"runtimeArgs": [
"--nolazy"
],
"runtimeExecutable": null,
"sourceMaps": true,
"stopOnEntry": true,
"type": "node"
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
1 - Put both files in the .vscode directory
2 - the .vscode directory must be placed in the root
{
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": [
"$tsc-watch"
],
"group": "build",
"label": "tsc: watch - tsconfig.json"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment