- ExpressJS - Home
- ExpressJS - Overview
- ExpressJS - Environment
- ExpressJS - Installation
- ExpressJS - Hello World
- ExpressJS - Routing
- ExpressJS - HTTP Methods
- ExpressJS - URL Building
- ExpressJS - Middleware
- ExpressJS - Templating
- ExpressJS - Static Files
- ExpressJS - Form Data
- ExpressJS - Database
- ExpressJS - Cookies
- ExpressJS - Sessions
- ExpressJS - Authentication
- ExpressJS - RESTful APIs
- ExpressJS - Scaffolding
- ExpressJS - Serving Dynamic Content
- ExpressJS - Handling File Uploads
- ExpressJS - Internationalization(i18n)
- ExpressJS - Security Practices
- ExpressJS - Rate Limiting
- ExpressJS - Slowing Down Responses
- ExpressJS - Error handling
- ExpressJS - Debugging
- ExpressJS - Best Practices
- ExpressJS - Resources
ExpressJS - Debugging
Express uses the Debug module to internally log information about route matching, middleware functions, application mode, etc.
Install debug module
E:\Dev\hello-world>npm install debug added 10 packages, removed 1 package, changed 2 packages, and audited 143 packages in 3s 20 packages are looking for funding run `npm fund` for details found 0 vulnerabilities
To see all internal logs used in Express, set the DEBUG environment variable to Express:* when starting the app −
E:\Dev\hello-world>set DEBUG=express:* E:\Dev\hello-world>nodemon index.js
The following output will be displayed.

These logs are very helpful when a component of your app is not functioning right. This verbose output might be a little overwhelming. You can also restrict the DEBUG variable to specific area to be logged. For example, if you wish to restrict the logger to application and router, you can use the following code.
DEBUG = express:application,express:router node index.js
Debug is turned off by default and is automatically turned on in production environment. Debug can also be extended to meet your needs, you can read more about it at its npm page.