Ferroscope
MCP server that enables AI assistants to debug Rust programs using LLDB and GDB.
Quick Start
1. Install
2. Configure Your AI Assistant
Add this to your AI assistant's MCP settings:
3. Add Custom Instructions
Copy this snippet to your AI assistant's custom instructions:
When debugging Rust programs, use ferroscope with this workflow:
1. 2.3.4.5.6.7.
Always start with debug_run, then set breakpoints before debug_continue.
For advanced debugging with optimized context usage, append our best practices to your CLAUDE.md:
4. Start Debugging
Ask your AI assistant: "Debug this Rust program" and it will use ferroscope automatically.
Configuration by AI Assistant
The configuration above works for Claude Code. Add it to Settings โ MCP Servers, then restart.
Add to .cursor/config.json
:
Add to tools configuration:
Add to ~/.config/zed/settings.json
:
For any MCP-compatible AI assistant, the command is ferroscope
. Check your assistant's documentation for "MCP tools" or "external tools".
Available Tools
debug_run
- Load and prepare Rust programs for debuggingdebug_break
- Set breakpoints at functions or linesdebug_continue
- Launch/continue program executiondebug_step
- Step through code line by linedebug_step_into
- Step into function callsdebug_step_out
- Step out of current functiondebug_eval
- Evaluate expressions and inspect variablesdebug_backtrace
- Show call stackdebug_list_breakpoints
- List all breakpointsdebug_state
- Get current debugging session state
Requirements
- Rust toolchain
- LLDB (macOS) or GDB (Linux)
- Windows not currently supported (WinDbg integration planned)
Verification
Check ferroscope is installed and working:
# Verify installation
# Test basic functionality
|
# Run test suite (if built from source)
# Expected output:
# ๐งช FERROSCOPE COMPREHENSIVE TEST SUITE
# โ
MCP Protocol Test: PASSED
# โ
Program Loading Test: PASSED
# โ
Breakpoint Test: PASSED
# ... (more tests)
# ๐ ALL TESTS PASSED! Ferroscope functionality verified!
Limitations
- Security: Currently runs with full user privileges without sandboxing. Only use with trusted code.
- Platform Support: Windows is not supported (WinDbg integration planned)
- Performance: No connection pooling or resource limits for concurrent debugging sessions
- Error Recovery: Limited error handling for malformed debugger output
- Binary Types: Only supports Rust binaries compiled with debug symbols
- Debugger Versions: Tested with LLDB 15+ and GDB 12+
Development and Releases
Ferroscope uses automated semantic versioning based on conventional commits. New versions are automatically published to crates.io when:
- Fixes are merged (patch release: 0.1.1 โ 0.1.2)
- Features are added (minor release: 0.1.1 โ 0.2.0)
- Breaking changes occur (major release: 0.1.1 โ 1.0.0)
See CONTRIBUTING.md for contribution guidelines and release process details.
Ready to debug Rust programs with AI! ๐ฆ