Better debug console
A VS Code extension that opens a filterable, exportable console automatically when a Flutter debug session starts.
Features
- Mirrors Debug Adapter Protocol output from Flutter/Dart debug sessions.
- Search logs with a case-insensitive text filter.
- Clear the current session's logs.
- Export the currently visible, filtered logs to a
.log or .txt file.
- Evaluate Dart expressions in the active debug session from the console input, with expandable object fields.
- Exposes the current debug logs to local MCP-compatible AI clients.
- Keeps the panel available as Better debug console at the bottom of VS Code.
Development
npm install
npm test
Press F5 in VS Code to launch an Extension Development Host.
Local AI debug-log bridge
When the extension is active, each VS Code extension host starts a read-only MCP bridge on a random loopback port and registers its window ID and port under ~/.better-debug-console/windows/. This allows multiple VS Code windows to expose logs at the same time.
The MCP server discovers active windows with list_debug_windows. When more than one window is active, pass the selected window_id to get_current_debug_log, search_debug_log, or get_debug_session. Requests without a window_id return an error instead of selecting the wrong window.
Compile the extension before packaging or testing it:
npm run compile
Configure a local stdio MCP server using the compiled server:
{
"mcpServers": {
"better-debug-console": {
"command": "node",
"args": ["/absolute/path/to/better-debug-console/out/mcpServer.js"]
}
}
}
The same stdio configuration can be used by Cursor, Windsurf, and Devin CLI. For Devin CLI, the equivalent command is:
devin mcp add better-debug-console -- node /absolute/path/to/better-debug-console/out/mcpServer.js
The extension must be running in VS Code for the MCP server to discover windows. The bridge and registry only listen to or accept data from the local machine. The direct Streamable HTTP endpoint remains available on each bridge's assigned loopback port, but the stdio server is the recommended multi-window entry point.
Notes
Flutter's VS Code extension uses the dart debug adapter type for Flutter sessions. This extension listens to both dart and flutter debug adapter types so it works with the common Flutter configurations and alternative adapters.
The console receives output events emitted by the debug adapter. It does not replace or modify VS Code's built-in Debug Console.