Tools like the V8 Inspector are fantastic for debugging during development, or when known steps exist for reproducing a bug. Unfortunately, production environments don't lend themselves as well to analysis using these tools. Stopping a production server while stepping through instructions would lead to a poor user experience, making it impractical.

The shortcomings of traditional debugging tools have lead to the rise of a separate class of debugging, referred to as postmortem debugging. This typically consists of capturing a core dump of a process when it crashes, restarting the process, and analyzing the core dump offline. This allows the process to be debugged while keeping the production system running.

This article explores the postmortem debugging process in more detail, including how to capture core dumps, and how those dumps can be analyzed using the llnode tool. For the purposes of this article, Node 8.9.3, llnode 1.6.2, and the latest LLVM are assumed. Unfortunately, many of the techniques described in this article do not currently apply to Windows operating systems, although there are efforts underway to improve this.

Core Dumps