Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Cosmopolitan C/C++New to Visual Studio Code? Get it now.
Cosmopolitan C/C++

Cosmopolitan C/C++

TinyLittle.Us

|
1 install
| (0) | Free
Automatically install Cosmopolitan and configure C/C++ workspaces to build with cosmocc.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
Cosmopolitan Honey Badger in Visual Studio Code

Cosmopolitan C/C++ for VS Code

This extension installs the Cosmopolitan cosmocc toolchain from the official https://cosmo.zip/pub/cosmocc/cosmocc.zip distribution into VS Code's extension storage. On Windows, it also downloads the POSIX shell and required Cosmos utilities from https://cosmo.zip/pub/cosmos/bin/, as required by Cosmopolitan's shell-script compiler drivers. It does not require administrator privileges or modify the system PATH.

On activation, it configures each open workspace folder's .vscode/settings.json with the Cosmopolitan compiler and C/C++ language standards. It adds single-file and workspace build tasks to .vscode/tasks.json, preserving unrelated settings and tasks. Run Cosmopolitan: Launch Workspace from the Command Palette to build all C/C++ sources and start the generated launch configuration. Run Cosmopolitan: Install Toolchain and Configure Workspace to retry setup at any time.

The first setup downloads the Cosmopolitan compiler archive (currently about 442 MB). On Windows, setup also bootstraps a private MSYS2 runtime and installs its UCRT64 GDB package into VS Code extension storage; no administrator access or system PATH changes are needed. Build tasks use -g -O0 and retain debug symbols. You can override the detected debugger using cosmopolitan.debuggerPath. Cosmopolitan emits a .dbg sidecar for source-level debugging; complete sidecar-aware debugging remains a future integration step.

Build the extension

npm install
npm run compile
npm run package

npm run package runs the VS Code extension packaging tool and creates a .vsix file in the project directory. It invokes the vscode:prepublish hook to compile the extension first.

Note about the license

ISC is a short, permissive open-source license, similar in spirit to MIT. It allows people to use, modify, and redistribute the software, provided they retain the copyright and permission notice. It also disclaims warranties and liability.

To preserve FOSS, the ISC license of this extension matches the Cosmopolitan repository. However, this extension and the Cosmopolitan repository are not licensed by the same parties.

References

  • Cosmopolitan README
  • Cosmopolitan compiler downloads
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft