/heapdump

Writes a JavaScript heap snapshot and memory breakdown for diagnosis.

What /heapdump does

This command writes a JavaScript heap snapshot and a memory breakdown to your desktop (or home directory on Linux). This output is used for diagnosing high memory usage issues. Only the diagnostics file should be shared, as the snapshot contains sensitive data.

Syntax

/heapdump

Quick drill

Three cards from the /cards deck. Open each to check your answer.

  1. Which command writes a JavaScript heap snapshot and memory breakdown to your desktop for diagnosing high memory usage?

    • Optimizes JavaScript code performance
    • Writes a JavaScript heap snapshot
    • Clears the application's memory cache
    • Analyzes code for memory leaks
    Show answer

    /heapdump: Writes a JavaScript heap snapshot

  2. Which command shows help information and lists all available commands?

    • Shows help and available commands
    • Opens the Claude Code documentation
    • Provides usage examples for a command
    • Suggests commands based on context
    Show answer

    /help: Shows help and available commands

  3. Which command allows you to view hook configurations for tool events?

    • Creates new custom hooks
    • Executes a specific tool hook
    • Manages global event listeners
    • Views hook configurations for tool events
    Show answer

    /hooks: Views hook configurations for tool events

Drill all 112 commands in /cards

Spaced repetition so the right command comes to mind in your terminal.