Debugging we all know that moment when 11-digit phone number format philippines things aren't working the way we want them to and a module isn't doing what it's supposed to. That's when it's time to debug. One strategy that has helped me a lot is to use the environment variable debug to get more detailed logs for a group of modules. For example, if you take a express basic server like this: javascript copy the code const app = require('express')(); const bodyparser = require('body-parser'); app.

Use(bodyparser.json()); // for parsing application/json app.use(bodyparser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded app.post('/', (req, res, next) => { console.log(req); }); app.listen(3000); and you run it with the variable debug set to * : bash copy the code debug=* node server.js you will receive a series of detailed logs that look like this: logs the "magic" is done with a lightweight module called debug that is extremely easy to use.