-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Node.js Cookbook - Fifth Edition
By :
debug is a popular library, used by many popular frameworks, including the Express.js web framework and the Mocha test framework. debug is a small JavaScript debugging utility based on the debugging technique used in Node.js runtime itself. It offers a straightforward and flexible way to manage debug logs, allowing you to enable or disable debugging dynamically, without altering your application code. By using debug, you can selectively control logging for different parts of your application, making it easier to diagnose issues and understand application flow.
In the recipe, we’ll discover how to enable debug logs on an Express.js application.
We’ll create an Express.js web application that we can enable debug logs on:
$ mkdir express-debug-app $ cd express-debug-app $ npm init --yes $ npm install express
server.js:$ touch...