@iflow-mcp/mizchi-debugger-mcp
v0.1.2
Published
Debug Adapter Protocol (DAP) tools for Model Context Protocol (MCP)
Readme
debugger-mcp
Debug Adapter Protocol (DAP) tools for Model Context Protocol (MCP).
Overview
debugger-mcp provides debugging capabilities through the Model Context Protocol, allowing AI assistants to:
- Launch and control debug sessions
- Set breakpoints and step through code
- Inspect variables and stack traces
- Track value changes over time
- Set and evaluate watch expressions
- Handle exception breakpoints
- Support source maps for TypeScript debugging
- Export debug logs for analysis
Installation
npm install debugger-mcpUsage
As an MCP Server
npx debugger-mcpCore Features
Session Management
debugger_launch- Launch a new debug sessiondebugger_attach- Attach to a running processdebugger_disconnect- End debug sessiondebugger_terminate- Forcefully terminate debug sessiondebugger_list_sessions- List all active debug sessions
Breakpoints
debugger_set_breakpoints- Set breakpoints in source filesdebugger_set_breakpoint- Set a single breakpointdebugger_remove_breakpoint- Remove a breakpointdebugger_list_breakpoints- List all breakpointsdebugger_clear_breakpoints- Clear all breakpoints
Execution Control
debugger_continue- Continue executiondebugger_step_over- Step over to the next linedebugger_step_into- Step into function callsdebugger_step_out- Step out of current functiondebugger_pause- Pause execution
Debugging Tools
debugger_get_stack_trace- Get current stack tracedebugger_get_variables- Get variables in current scopedebugger_evaluate- Evaluate expressionsdebugger_get_threads- Get thread information
Value Tracking
debugger_track_value- Track value changes over timedebugger_get_value_history- Get history of tracked valuesdebugger_set_time_checkpoint- Set time checkpointsdebugger_get_time_since_checkpoint- Get elapsed time since checkpoint
Exception Handling
debugger_set_exception_breakpoints- Configure exception breakpointsdebugger_get_exception_info- Get current exception informationdebugger_clear_exception_breakpoints- Clear exception breakpoints
Watch Expressions
debugger_add_watch- Add a watch expressiondebugger_remove_watch- Remove a watch expressiondebugger_evaluate_watches- Evaluate all watch expressionsdebugger_list_watches- List all watch expressions
Source Map Support
debugger_enable_source_maps- Enable/disable source map supportdebugger_check_source_map- Check if a file has source mapsdebugger_map_location- Map locations between source and generated codedebugger_set_breakpoint_source_mapped- Set breakpoint with source map resolution
Logging and Export
debugger_get_log- Get debug session logdebugger_export_log- Export debug session logsdebugger_get_events- Get debug events for a session
Supported Debug Adapters
- Node.js (built-in) - Full support for debugging Node.js applications
- Custom adapters can be added by implementing the Debug Adapter Protocol
Development
# Install dependencies
pnpm install
# Build
pnpm build
# Run tests
pnpm test
# Type check
pnpm typecheck
# Lint
pnpm lintArchitecture
The project is organized into several core modules:
- Session Management - Handles debug session lifecycle
- Breakpoint Management - Manages breakpoints across files
- Value Tracking - Tracks variable changes over time
- Watch Management - Manages watch expressions
- Source Map Support - Provides TypeScript debugging support
- Exception Handling - Manages exception breakpoints
Testing
The project includes comprehensive test coverage:
- Unit tests for all manager classes
- Integration tests for the complete debugging workflow
- Tests for exception handling, watch expressions, and source maps
License
MIT
