Windhawk Source Amalgamation for VS Code.
Write a Windhawk mod across several C++ files, then generate a single .wh.cpp to use in Windhawk. The output also keeps the information needed to recover those source files later.
- Install the WHAM
.vsixthrough Extensions: Install from VSIX… in VS Code. - Open WHAM in the activity bar. Choose New project, Existing project, or Recover mods.
- Apply the suggested editor setup, customize it, or skip it. Extension settings holds installation and elevation preferences. Project settings → Editor shows the C++ language service and indentation from the project's editor files. Use Apply there to write your choices. The shared
.vscode/extensions.jsonrecommends both Microsoft C/C++ and clangd.
Open project remembers recent folders and opens existing WHAM projects without setup prompts. Browse to select another source folder.
Keep each mod's entry .cpp and its local headers under src/. WHAM follows the includes and writes one .wh.cpp per entry to output/.
src/mod.cpp + included headers → output/mod.wh.cpp
Output updates when you save. Use Generate for a single mod or Generate all for the project. Settings controls generation, compiler integration, indentation, and Git ignore rules.
New projects get src/, output/, configuration, and Git setup. Git ignore rules cover generated output and local editor settings. If Git already tracks any machine-specific editor files, Apply offers to stop tracking them and keep them on disk. Create initial Git commit is optional for new or recovered repositories and uses your existing Git identity.
Recover mods rebuilds a source tree from one or more WHAM-generated files. Keep the WHAM boundary comments and recovery footer intact. Ordinary .wh.cpp files cannot recover their former project layout. New outputs need WHAM 1.7.0 or newer for recovery; older WHAM outputs are still supported.
If you edit generated output, WHAM pauses regeneration so your changes aren't overwritten. Restore those edits to source or explicitly discard them before generating again.
Compile generates and installs the current mod in Windhawk, keeping its Enabled state. The first build starts disabled. The dropdown offers Test build without installing, Verify syntax for its declared architectures, and Stop compilation while a build is running. Click the mod name to preview its README and default settings in the sidebar. Use the external-link button beside Refresh to open Windhawk and change installed settings.
The preview works without Windhawk. Compilation and installed-mod controls need a compatible Windhawk 2.0 CLI. See the user guide for configuration, CLI commands, and supported C++ constructs.
Standard Windhawk installs need elevation for compilation and installed-mod changes. Choose Windows sudo (may require more prompts) or gsudo (once per VS Code session) under Extension settings. WHAM detects gsudo on PATH or in Scoop. None uses VS Code's current permissions. Extension settings are saved as VS Code user settings (wham.windhawkPath, wham.elevation, wham.gsudoPath, wham.languageService), so you can also change them in the Settings editor. The paths and elevation method stay on this computer and aren't synced. The default language service applies to projects whose editor files configure none. A configured project keeps its choice when you copy those files to another computer.
Use Node.js 20 or newer, Git, and Windhawk’s Windows compiler. Set WINDHAWK_HOME if its installation isn’t detected.
npm ci
npm test
npm run packagePackaging creates a .vsix in this folder. Press F5 in VS Code to launch a development host.
Extract the stable Windows x64 ZIP so Code.exe is at work/vscode-portable/Code.exe.
After npm run build, run npm run test:host. Download the ZIP
The disposable profile, extensions, temporary files, test projects, and results stay under work/.
WHAM's own code is MIT licensed. The bundled Windhawk renderer, icon, and adapted syntax grammar are GPLv3; see third-party notices. WHAM is an independent project.

