Generate heap snapshots on demand.
Section: Memory, Profiling, and Coverage
Write heap snapshot on signal
bash
bash
node --heapsnapshot-signal=SIGUSR2 app.jsExplanation
Useful for long-running services where you want snapshots without stopping the process.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Memory, Profiling, and Coverage