Chapter 11. Debugging: Designing for introspection and resolving issues

This chapter covers

  • Handling uncaught exceptions
  • Linting Node applications
  • Using debugging tools
  • Profiling applications and investigating memory leaks
  • Using a REPL to investigate a running process
  • Tracing system calls

Understanding how errors are generated and handled in any given platform is paramount to building stable applications. Good error introspection and tests that are built-in are the best offense for debugging issues later on. In this chapter we focus on how to prepare for and what to do when things go south.

Maybe your process keeps crashing or it’s using more memory than you expected. Perhaps it’s stuck at 100% CPU usage. We’ll look at debugging solutions ...

Get Node.js in Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.