Skip to content

Instantly share code, notes, and snippets.

@dereckmezquita
Last active August 13, 2024 15:19
Show Gist options
  • Save dereckmezquita/3d50bf9346668b839d31e1a722d18260 to your computer and use it in GitHub Desktop.
Save dereckmezquita/3d50bf9346668b839d31e1a722d18260 to your computer and use it in GitHub Desktop.
How to interactive debug TypeScript in vscode.
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: pytest",
"type": "python",
"request": "launch",
"module": "pytest",
"args": [
"-v",
"--no-cov"
],
"cwd": "${workspaceFolder}",
"env": {"PYTHONPATH": "${workspaceFolder}"},
"console": "integratedTerminal"
}
]
}
// https://yewtu.be/watch?v=f3i9b3uK00U
// npm install --save-dev ts-node tsconfig-paths
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug TypeScript",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"runtimeArgs": [
"-r",
"ts-node/register",
"-r",
"tsconfig-paths/register",
],
// "args": [
// // if tsconfig in different location than expected
// "-P",
// "server/tsconfig.json"
// ],
// "console": "integratedTerminal",
// "outFiles": [
// "${workspaceFolder}/server/dist/**/*.js"
// ]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment