Created
June 16, 2020 23:26
-
-
Save cecilemuller/a8cf12d52ca4f2fc4ba8a9d634b060f9 to your computer and use it in GitHub Desktop.
Run nodemon in the VSCode debugger
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Nodemon for Typescript", | |
"type": "node", | |
"request": "launch", | |
"runtimeExecutable": "nodemon", | |
"cwd": "${workspaceFolder}", | |
"runtimeArgs": ["--exec", "node --inspect-brk=9229 --require ts-node/register src/server.ts"], | |
"port": 9229, | |
"internalConsoleOptions": "openOnSessionStart", | |
"skipFiles": ["<node_internals>/**", "node_modules/**"], | |
"restart": true | |
}, | |
{ | |
"name": "Nodemon for Javascript", | |
"type": "node", | |
"request": "launch", | |
"runtimeExecutable": "nodemon", | |
"cwd": "${workspaceRoot}", | |
"program": "${workspaceRoot}/src/server.js", | |
"internalConsoleOptions": "openOnSessionStart", | |
"skipFiles": ["<node_internals>/**", "node_modules/**"], | |
"restart": true | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that it only works for servers (such as Express), it doesn't work for "run once and stop, then run again if the file changed" scripts.