Last active
March 18, 2022 01:43
-
-
Save iulo/9c3a50b790e2d4272e163436e39d01f5 to your computer and use it in GitHub Desktop.
vscode debug typescript(offcial or ts-node)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// 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/**"] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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