Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>C Memory VisualizerNew to Visual Studio Code? Get it now.
C Memory Visualizer

C Memory Visualizer

The-Pequod

|
2 installs
| (0) | Free
Visualize the memory layout of C variables, inspect heap allocations, and follow pointers as you debug.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C Memory Visualizer

C Memory Visualizer is a VS Code extension for learning how C programs use memory. Each time the debugger pauses, you can inspect the memory layout of variables on the stack and in the data region, explore heap allocations, and follow pointers to their targets.

Memory overview

Requirements

  • Windows x64
  • A 64-bit C program built with DWARF debug information

Use one of the following debug setups. The debugger must support Python scripting.

Debugger VS Code extension launch.json type
LLDB CodeLLDB lldb
LLDB LLDB DAP lldb-dap
GDB Microsoft C/C++ cppdbg with MIMode set to gdb

Build and debugger settings

For MinGW builds, compile with -g to include DWARF debug information. The table lists the settings specific to each setup.

Compiler and debugger Build command Additional launch.json settings
MinGW GCC + GDB (cppdbg) — —
MinGW Clang + MinGW LLDB (lldb-dap) — —
MinGW Clang + CodeLLDB (lldb) — Recommended: Set CodeLLDB to use the GNU ABI to match the MinGW build.
"initCommands": ["settings set plugin.object-file.pe-coff.abi gnu"]
MSVC Clang + CodeLLDB (lldb) clang -gdwarf -fuse-ld=lld main.c -o main.exe "-Wl,/debug:dwarf" —

How to Use

  1. Before starting a debug session, open the Command Palette and run C Memory Visualizer: Open View.
  2. Set a breakpoint in your C program and start debugging.
  3. When the debugger pauses, search for a variable and select it to open its memory view. For a pointer, select Follow pointer to open its target.

Recommended: Use the VS Code debug toolbar or keyboard shortcuts to step or continue. With CodeLLDB, the debug session may stop responding if you continue from the Debug Console while the extension is collecting a snapshot.

View controls

  • Pan the view — Hold the right mouse button and drag.
  • Move a window — Drag its header with the left mouse button.
  • Zoom in or out — Hold Ctrl and scroll the mouse wheel.

Limitations

  • The extension supports C programs that run in a single process with a single thread.
  • Visualization of unions, bit-fields, and flexible array members is unsupported.
  • The Follow pointer button is disabled for pointers to functions.
  • When debugging a MinGW build with CodeLLDB, an ABI mismatch can cause long double to appear as __float128. See Build and debugger settings.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft