The extension provides deep integration with the Malterlib build system, allowing you to generate, build, and manage projects directly from VS Code.
The extension automatically provides these tasks through the task provider:
Generates all workspaces in the project.
Important: Before using any tasks, you must first generate on the command line:
./mib generate
# or with custom output directory:
./mib generate --output-directory "$PWD/BuildSystem/MyBuildSystem"This populates the generator dropdown with the generator that was used. Each generation adds that specific generator/path combination to the dropdown.
Currently Supported Generators:
- Xcode (macOS)
- Visual Studio (Windows)
What it does:
- Uses the previously selected generator from command line generation
- Generates project files for all workspaces
- Updates build directory structure
Generates the currently selected workspace only.
What it does:
- Uses the selected generator
- Generates project files for the selected workspace
- Faster than generating all workspaces
Builds the entire selected workspace.
What it does:
- Ensures project is generated
- Invokes platform build tool (Xcode or Visual Studio)
- Builds all targets in the workspace in dependency order
- Reports errors through problem matcher
Builds a specific target selected from the status bar.
What it does:
- Builds only the selected target
- Builds dependencies if needed
- Faster than full workspace build
- Useful for iterative development
The extension includes problem matchers that automatically parse build output and populate the VS Code Problems panel with errors and warnings from the Malterlib build system.
The generate and build commands automatically detect and report:
- Compiler errors and warnings
- Linker errors
- Build system configuration issues
For enhanced problem matching capabilities, including support for more complex error patterns and multi-file references, use Unbroken Code - a specialized VS Code build that includes extended problem matcher features not yet available in standard VS Code releases.
Automatic Project Detection:
The extension detects Malterlib projects by looking for *.MBuildSystem files in the project root directory.
Generator Detection:
Generators are discovered by scanning BuildSystem/*/ConfigStore directories, which contain JSON files describing each generated build configuration.
Detection Process:
- On activation, scans for
*.MBuildSystemin project root - Scans
BuildSystem/*/ConfigStorefor generator configurations - Populates dropdown with discovered generators
- Updates when generators are added or removed
Selection Flow:
1. Choose Generator → Updates available workspaces
2. Select Workspace → Updates available configurations
3. Pick Configuration → Updates available targets
4. Select Target → Ready to build
The generation tasks run the ./mib generate command with the appropriate options based on your selections in the status bar.
Generator Outputs:
| Generator | Creates |
|---|---|
| Xcode | .xcodeproj, .xcworkspace |
| Visual Studio | .vcxproj, .sln |
The build tasks invoke the appropriate platform build tool (Xcode or Visual Studio) with the selected configuration. Build output is displayed in the terminal and errors are automatically parsed into the Problems panel.
Add to keybindings.json:
[
{
"key": "shift+alt+b",
"command": "workbench.action.tasks.runTask",
"args": "Malterlib: Generate Workspace"
},
{
"key": "alt+b",
"command": "workbench.action.tasks.runTask",
"args": "Malterlib: Build Workspace"
}
]- Status Bar Controls - UI for build selection
- Debug Configuration - Debugging built targets