Skip to content

Instantly share code, notes, and snippets.

@iulo
Last active March 18, 2022 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iulo/9c3a50b790e2d4272e163436e39d01f5 to your computer and use it in GitHub Desktop.
Save iulo/9c3a50b790e2d4272e163436e39d01f5 to your computer and use it in GitHub Desktop.
vscode debug typescript(offcial or ts-node)
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "tsnode-debug",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
"args": ["test/local-debug-ast.ts"],
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": ["<node_internals>/**", "node_modules/**"]
}
]
}
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "typescript-debug",
"skipFiles": [
"<node_internals>/**"
],
// https://code.visualstudio.com/docs/typescript/typescript-debugging
// defore debug you should build lastest code
"preLaunchTask": "tsc: build - tsconfig.json",
"program": "${workspaceFolder}/some-code",
"args": [],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
// "stopOnEntry": true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment