AI Debug Assistant
Preview
The AI Debug Assistant is currently in preview and may change in future releases.
The AI Debug Assistant is an agentic AI system built into CodeFusion Studio that actively participates in your debug sessions. Rather than answering static questions about your source code, it can autonomously investigate faults, inspect live hardware state, coordinate across multiple cores, and reason about what your silicon is actually doing - all in real time.
The AI Debug Assistant is accessible through the CFS MCP debug server, an integration built on the Model Context Protocol (MCP), an open standard created by Anthropic for connecting AI models to external tools and data sources. It works with GitHub Copilot Agent Mode, Claude Code, and other MCP-compatible AI clients.
In this section you'll find:
- Getting started — prerequisites and setup for the CFS MCP debug server.
- Using the AI Debug Assistant — using the MCP server with real-world debugging examples.
- Tools and workflows reference — full reference for all debug tools and pre-built diagnostic prompts.
- Troubleshooting — troubleshooting guidance and information.
What makes this different
There is a meaningful difference between an AI that suggests the next line of code and one that can autonomously coordinate debug sessions, read fault registers, decode exception frames, correlate a shared-memory conflict, and tell you that your DMA descriptor on Core 1 is racing against a buffer reallocation on Core 0.
The AI Debug Assistant bridges that gap. It enables agentic debugging workflows — where the AI doesn't wait to be guided step by step, but instead autonomously orchestrates multi-step investigations, correlates hardware state across subsystems, and reports findings in plain language.
What it can do
The AI Debug Assistant provides a comprehensive set of debug tools, contextual resources, and pre-built diagnostic prompts.
| Capability | Description |
|---|---|
| Session control | Start, stop, restart, continue, pause, and step through debug sessions |
| Hardware state inspection | Read registers, memory, variables, stack traces, and thread lists directly from the target |
| Breakpoints and watchpoints | Set, list, and remove breakpoints — including conditional breakpoints — and hardware watchpoints |
| GDB command execution | Run GDB commands with built-in safety guards that block destructive operations |
| Fault decoding | Automatically parse ARM Cortex-M fault registers (CFSR, HFSR, BFAR, MMFAR) and RISC-V exception registers (mcause, mtval, mepc) into human-readable diagnoses |
| ELF binary analysis | Surface symbol sizes, stack usage, section layout, and the largest consumers of flash and RAM |
| Structured diagnostic prompts | Pre-built investigation sequences for crash diagnosis, memory corruption, peripheral misconfiguration, multi-core debugging, and more |
How to use the AI Debug Assistant
The AI Debug Assistant is available through the CFS MCP debug server. Start the server, then connect any MCP-compatible AI client.
| Client | Connection Method |
|---|---|
| GitHub Copilot (Agent Mode) | Requires MCP server started with (CFS) MCP: Start Debug Server command. See Getting started. |
| Claude Code | Register the server with claude mcp add --transport http cfs-debug http://localhost:<port>/mcp. See Getting started. |
| Any MCP-compatible client | The MCP server is open by design. Any AI client that supports the Model Context Protocol can connect. See Getting started. |
Tip
When the MCP server starts, the built-in MCP client in VS Code connects automatically for GitHub Copilot Agent Mode, so the debug tools are ready to use without extra steps in VS Code. Other clients, such as Claude Code, still need to be registered manually — see Getting started.
