Flutter Debug Console Bridge
Version
License: MIT
VS Code
What it does
Silently captures Flutter / Dart debug console output and writes it to a local log file that AI agents and external tools can read directly.
Demo / Screenshots
Add your visuals before Marketplace launch for higher conversion.
images/statusbar-idle.png - Idle state (Flutter Tap: idle)
images/statusbar-recording.png - Recording state (Flutter Tap: recording)
images/open-log-command.gif - Command palette -> Open Log File -> live log updates
Why
When debugging Flutter in VS Code, logs are easy for humans to see but hard for automation to consume.
This extension bridges that gap by turning debug console output into a predictable file stream.
It is useful for:
- Agent-assisted debugging in Cursor / MCP workflows
- Local automation scripts that parse runtime logs
- Keeping a simple, append-only artifact of debug output
Features
- Captures Dart debug adapter
output events during Flutter debug sessions
- Writes a session header (
Session, Device, Started) at launch
- Appends console output in real time to a configurable file path
- Writes a session footer (
Ended, Output lines) on stop
- Auto-rotates oversized log files (keeps last 50%, prepends
[ROTATED])
- Shows a status bar state (
idle / recording / off)
- Includes commands to open, clear, and toggle capture
Quick start (60 seconds)
- Install Flutter Debug Console Bridge.
- Open a Flutter project in VS Code.
- Start debugging (F5).
- Run command: Flutter Debug Console Bridge: Open Log File.
- Confirm you can see debug output in:
/tmp/debug-console-logs/flutter_debug.log
Requirements
- VS Code
^1.80.0
- Dart (and Flutter tooling as needed)
- A Flutter / Dart workspace you can launch under the Dart debug type (
dart)
Extension Settings
| Setting |
Description |
Default |
flutter-debug-console-bridge.logFilePath |
Absolute path of the log file |
/tmp/debug-console-logs/flutter_debug.log |
flutter-debug-console-bridge.enabled |
Master switch for capture |
true |
flutter-debug-console-bridge.showStatusBar |
Show the status bar item |
true |
flutter-debug-console-bridge.maxFileSizeKB |
Rotate the log when it exceeds this size (KB), keeping the last half |
2048 |
Commands
Available from Command Palette:
Flutter Debug Console Bridge: Open Log File
Flutter Debug Console Bridge: Clear Log File
Flutter Debug Console Bridge: Toggle On/Off
Working with MCP
Expose only the dedicated log directory (/tmp/debug-console-logs) to your filesystem MCP server.
This avoids mounting unrelated files from /tmp.
MCP example
~/.cursor/mcp.json (paths are examples — adjust for your machine):
{
"mcpServers": {
"flutter-debug-log-fs": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/tmp/debug-console-logs"
]
}
}
}
With the default setting, the log file is:
/tmp/debug-console-logs/flutter_debug.log
So MCP tools can read only the required folder.
Troubleshooting
No log output is captured
- Confirm the extension is enabled:
flutter-debug-console-bridge.enabled = true
- Confirm your debug type is
dart (Flutter / Dart extension pipeline)
- Start a new debug session after changing settings
Log file does not exist
- Run Open Log File command once (it creates the file if missing)
- Check file path in settings and ensure VS Code has write permissions
Old content disappears unexpectedly
- Check
flutter-debug-console-bridge.maxFileSizeKB
- Rotation is expected behavior; file keeps only the newest half when size limit is exceeded
FAQ
Does this send logs to any remote service?
No. This extension writes locally to your configured file path only.
Does it modify my Flutter app or debug adapter behavior?
No. It passively listens to debug adapter output events and mirrors them to a file.
Can I change the log location?
Yes. Set flutter-debug-console-bridge.logFilePath to any writable absolute path.
Known limitations
- Capture depends on the Dart debug adapter emitting standard DAP
output events for debug console text; unusual adapters or custom launch configs might omit some streams.
- The “device” line is derived from fields present in the launch configuration; it is informative, not a guaranteed hardware fingerprint.
- Log rotation keeps the trailing 50% of bytes (not strictly line-oriented), which can split multibyte characters in rare edge cases.
Release notes
See CHANGELOG.md.
Publishing to the VS Code Marketplace
- Create a publisher at https://marketplace.visualstudio.com/manage.
- Create a Personal Access Token with Marketplace (Manage) scope in Azure DevOps.
- Install the packaging tool:
npm install -g @vscode/vsce
- Login:
vsce login JonathanIMLee
- Package:
vsce package
- Publish:
vsce publish
- Marketplace URL pattern:
https://marketplace.visualstudio.com/items?itemName=JonathanIMLee.flutter-debug-console-bridge
Contributing
Issues and PRs are welcome:
https://github.com/JonathanIMLee/flutter-debug-console-bridge/issues