Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Hammer BuildNew to Visual Studio Code? Get it now.
Hammer Build

Hammer Build

Tommaso Murolo

|
1 install
| (0) | Free
VSCode integration for the Hammer C/C++ build system
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Hammer Build — VSCode Extension

VSCode integration for the Hammer build system.

For information on Hammer as a project, see the project README.

Prerequisites

Hammer is a POSIX-only tool. On Linux and macOS it works out of the box. On Windows, you must have WSL (Windows Subsystem for Linux) installed with at least one Linux distribution — the extension will not function without it.

Usage

Press Ctrl+Shift+B to build.

  • First time: the extension will ask you to pick your build script (a .c or .cpp file). It will compile it into a build executable using the Hammer CLI. This is a one-time step called bootstrapping.
  • After that: Ctrl+Shift+B runs the build executable directly — no further setup needed. The build executable also knows how to recompile itself if you ever change the build script.

Press Ctrl+Shift+R to run a built executable.

  • If the last build produced one executable, it runs immediately.
  • If it produced several, a picker lets you choose which one to run.

Press Ctrl+Shift+C to clear the Hammer configuration (.hammer and .hammer_run). Use this to re-bootstrap from scratch — for example after renaming or switching the build script.

Debugging

Press Ctrl+Shift+Z (or F5) to launch the last-built executable under a debugger with full IDE integration (breakpoints, variable inspection, call stack).

Prerequisites for debugging

  1. Compile with debug symbols. Add AddCompilerFlags(self, "-g -O0") to your build script target. Without -g the debugger cannot map instructions back to source lines.

  2. Install a C/C++ debugger extension. Either:

    • C/C++ (ms-vscode.cpptools) — uses GDB on Linux and LLDB on macOS.
    • CodeLLDB (vadimcn.vscode-lldb) — LLDB-based, works on both platforms.

    If neither is installed the extension will prompt you to install one.

  3. GDB or LLDB installed in your system (if using ms-vscode.cpptools):

    • Linux: apt install gdb (or distro equivalent)
    • macOS: LLDB ships with Xcode Command Line Tools (xcode-select --install)

Note: Debugging on Windows (WSL2) is not yet supported by this extension.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft