Languages
[Edit]
EN

VS Code - debug Express.js under Node.js server

5 points
Created by:
troya
692

In this short article, we would like to show how to configure VS Code to debug Express.js applications.

Quick solution (create the following .vscode/launch.json configuration file):

Hint: you can change "node index.js" to "nodemon index.js" to debug Expess.js with nodemon.

Screenshot:

VS Code debugger used with Express.js application.
VS Code debugger used with Express.js application.

Project structure

Edit

index.js file:

package.json file:

Node.js packages should be installed with the following command:

Where: ci parameter runs installation without changing the version of the used packages.

See also

Edit
  1. VS Code - debug js file with Node.js
  2. VS Code - debug with npm run

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join