Skip to content

Instantly share code, notes, and snippets.

@zerosrat
Last active March 13, 2024 08:06
Show Gist options
  • Save zerosrat/0d8c9172dbb5088c04e4edb581363113 to your computer and use it in GitHub Desktop.
Save zerosrat/0d8c9172dbb5088c04e4edb581363113 to your computer and use it in GitHub Desktop.
node ts debug config
require('./lib/bin/index.js')
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"runtimeExecutable": "/Users/jerryu/.nvm/versions/node/v16.20.0/bin/node",
"request": "launch",
"name": "Debug check",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/index.js",
"runtimeArgs": ["--inspect"],
"args": ["check"],
"preLaunchTask": "npm: build",
"outFiles": ["${workspaceFolder}/lib/**/*.js"]
},
{
"type": "node",
"request": "launch",
"name": "Debug ts-node check",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/src/bin/index.ts",
"runtimeArgs": ["--inspect", "-r", "ts-node/register"],
"args": ["check"]
},
]
}
{
"scripts": {
"debug": "node --inspect -r ts-node/register ./src/bin/index.ts generate",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment