WatchBuildLog VS Code Extension
A Visual Studio Code extension that monitors build log files for errors and displays them in VS Code's Problems panel.
- Auto monitoring: Watches build log files for changes and automatically parses new content
- Custom wildcard log paths: Configurable paths to log files including wildcard patterns.
- Custom problem patterns: Configurable problem matcher patterns to identify different types of build errors with file locations, line numbers, and severity
- VS Code integration: Displays errors in the Problems panel with clickable links to source files. Also supports related information for errors.
The extension provides the following commands accessible via the Command Palette (Ctrl+Shift+P):
- WatchBuildLog: Start Watching Build Log - Begin monitoring the configured log file
- WatchBuildLog: Stop Watching Build Log - Stop monitoring and clear error diagnostics
Configure the extension through VS Code settings:
watchbuildlog.logFilePathWildcards
- Type: array
- Default: ["out/*/siso_output"]
- Description: Glob-style wildcard patterns for build log files. Patterns can be absolute paths or relative to the project root. Use '*' to match any text in a folder segment.
- Scope: Resource (can be set per workspace)
- Examples:
- "out/*_x64/siso.log" - Matches siso.log in any subfolder of out/ that ends with _x64
- "build/*/errors.log" - Matches errors.log in any direct subfolder of build/
- "C:/logs/*.log" - Absolute path matching any .log file in C:/logs/
- Type: boolean
- Default: true
- Description: Automatically start watching when VS Code opens
watchbuildlog.problemMatcherPatterns
- Type: array
- Description: Problem matcher patterns similar to VS Code's task system. Each pattern defines a regex and capture group indices for extracting error information from build logs.
-
Configure log file patterns:
- Open VS Code Settings (Ctrl+,)
- Search for "watchbuildlog"
- Add wildcard patterns to "Log File Path Wildcards" (default includes "out/*/siso_output")
- Or add to your settings.json: "watchbuildlog.logFilePathWildcards": ["out/*_x64/siso.log", "build/*/errors.log"]
-
Start watching: The extension auto-starts by default, or run "Start Watching Build Log" command manually
-
View errors: Build errors will appear in the Problems panel (Ctrl+Shift+M)
-
Navigate to errors: Click on errors in the Problems panel to jump to the source location
-
Via Settings UI:
- Open Settings (Ctrl+,)
- Search for "Watch Build Log" or "watchbuildlog"
- Configure all extension settings through the UI
-
Via JSON Settings:
{
"watchbuildlog.logFilePathWildcards": [
"out/*_x64/siso.log",
"build/*/errors.log",
"C:/absolute/path/to/build.log"
],
"watchbuildlog.autoStart": true,
"watchbuildlog.problemMatcherPatterns": [
{
"regexp": "^(.*)\\((\\d+),(\\d+)\\)\\s*:\\s*([^: ]+)[^:]*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
Wildcard Pattern Examples
- "out/*_x64/siso.log" - Matches out/Debug_x64/siso.log, out/Release_x64/siso.log, etc.
- "build/*/logs/*.log" - Matches any .log file in any subfolder of build/*/logs/
- "**/build.log" - Matches build.log in any subdirectory at any depth
- "logs/*" - Matches any file directly in the logs folder
- Clone this repository
- Press F5 to open a new Extension Development Host window (no build step required!)
- Install vsce: npm install -g vsce
- Run vsce package to create a .vsix file
- Install via code --install-extension watchbuildlog-0.0.1.vsix
- Visual Studio Code 1.74.0 or higher
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.