Visual Studio Code workspace generator for Premake.
Supports GCC, Clang and MSVC through Make, Ninja or Visual Studio Solution file.
Note: For ninja you also need premake-ninja.
- Put these files in a
vscodesubdirectory in one of Premake's search paths. - Add the line
require "vscode"preferably to your premake-system.lua, or to your premake5.lua script. - Generate project files and then VSCode workspace
premake5 gmake/vs2026
premake5 vscode
premake5 vscode --[make, ninja, vs] --dbgtype=[cppdbg, lldb]
--dbgtype=VALUE: Specifies the debugger type used in the generatedlaunch.json(default:cppdbg).cppdbg: Usecppdbgfrom the official ms-vscode.cpptools extension.lldb: Uselldbfrom the vadimcn.vscode-lldb (CodeLLDB) extension.
Note: For Ninja please use the Visual Studio Developer Command Prompt.
Currently this generater only supports a single Premake Workspace.
This generator only supports C/C++, all other project types are ignored.
This generator will generate the following files:
- <WorkspaceName>.code-workspace (only if it doesn't already exist)
- .vscode/c_cpp_properties.json
- .vscode/launch.json
- .vscode/tasks.json