Skip to content

Instantly share code, notes, and snippets.

@barisbll
Last active June 1, 2023 08:50
Show Gist options
  • Save barisbll/b37b0b5b1d509a850a19e510ae3db2d4 to your computer and use it in GitHub Desktop.
Save barisbll/b37b0b5b1d509a850a19e510ae3db2d4 to your computer and use it in GitHub Desktop.
Typescript VSCode Debug Setting
{
// First build your application exp: npm run build
// Then run the index.js on debug mode exp: node --inspect ./dist/index.js
// For a running server on kubernetes after the ssh connection you can send a signal to process to open the debug mode
// exp: https://medium.com/hackernoon/debugging-node-without-restarting-processes-bd5d5c98f200
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "Attach to Process",
"request": "attach",
"port": 9229,
"localRoot": "${workspaceFolder}/dist",
"remoteRoot": "/app/dist/",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"skipFiles": [
"<node_internals>/**/*.js"
]
}
]
}
@barisbll
Copy link
Author

barisbll commented Jun 1, 2023

Note that, this one only works if your build folder is named "dist"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment