O'Reilly logo

Beginning Node.js by Basarat Ali Syed

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 11

image

Debugging

Everyone knows that debugging is twice as hard as writing a program in the first place.

—Brian Kernighan

When undertaking a production application, it is important to have good debugging tools in your tool belt. This can save you plenty of hair pulling and head scratching. In this chapter, we will look at the most basic of debugging assistance tools along with high-powered IDEs and tricks of the trade.

The Console Object

The simplest form of debugging is simple logging. The console is a global object available in Node.js. It is intentionally designed to mimic the behavior of a web browser’s console object. We have been using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required