Generate Compile Commands

Generate compile_commands.json (clang compilation database) for the C++ language server. Covers MSBuild (.sln, .slnx, .vcxproj) via microsoft/msbuild-extractor-sample and CMake projects via CMAKE_EXPORT_COMPILE_COMMANDS. Use whenever the user asks to "regenerate compile commands", "regenerate the project", "reload the project", "load the project", "refresh compile commands", or otherwise needs a fresh compilation database for mscppls.

Microsoft Updated 195k repo stars
Demo using GitHub Copilot CLI in the bullet3 C++ project where several LSP operations are invoked.

File contents

microsoft/cpp-language-server commit d646c516fb

Frequently asked questions

npx get-skill add microsoft/generate-compile-commands