Add checkpoint and Debug NodeJS code in vscode
Aug 1, 2022
In this article I will show you how to debug nodejs code in vscode.
First create lunch.json by clicking on debug icon on left side of vs code and click on create a lunch.json file and paste following json object.
// .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch URL Shortener",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/src/server.js"
}
]
Now run the debugger by clicking run and debug button. That’s it for today thank you.