UNPKG

@debugmcp/mcp-debugger

Version:

Run-time step-through debugging for LLM agents.

134 lines (102 loc) 5.02 kB
# mcp-debugger Testing and Documentation Update Report **Date:** 2025-06-11 **Tester:** AI Assistant **Version Tested:** mcp-debugger v0.9.0 ## Executive Summary Successfully tested the mcp-debugger MCP server and rewrote all documentation based on actual hands-on experience. The documentation now accurately reflects the real behavior of the server, with misleading conversational examples replaced by actual MCP tool calls with JSON parameters and responses. ## Testing Conducted ### Tools Tested Successfully ✅ 1. **create_debug_session** - Creates sessions with UUID format IDs 2. **list_debug_sessions** - Lists active sessions with full details 3. **set_breakpoint** - Sets breakpoints (always verified: false initially) 4. **start_debugging** - Starts debugging and pauses at breakpoints 5. **get_stack_trace** - Returns stack frames with IDs 6. **get_scopes** - Returns scopes with variablesReference 7. **get_variables** - Gets variables using scope's variablesReference 8. **step_over** - Steps over lines successfully 9. **step_into** - Steps into functions 10. **step_out** - Steps out of functions 11. **continue_execution** - Continues until next breakpoint 12. **close_debug_session** - Closes sessions ### Tools Not Implemented ❌ 1. **pause_execution** - Returns "not yet implemented with proxy" 2. **evaluate_expression** - Returns "not yet implemented with proxy" 3. **get_source_context** - Returns "not yet fully implemented with proxy" ## Key Discoveries ### 1. Session ID Format - Sessions use UUID format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` - Example: `a4d1acc8-84a8-44fe-a13e-28628c5b33c7` ### 2. Scope Parameter Mystery Solved The `scope` parameter for `get_variables` is the `variablesReference` from `get_scopes`, NOT the frame ID: - Wrong: Use frame ID from stack trace - Correct: Use variablesReference from get_scopes ### 3. Breakpoint Verification - Breakpoints always show `"verified": false` when set - They become verified only after debugging starts - Must be set on executable lines (not comments/blank lines) ### 4. File Path Handling - Server converts relative paths to absolute paths - Responses always include full absolute paths - Windows paths use backslashes in responses ### 5. Session Lifecycle - Sessions can terminate unexpectedly - Error: "Managed session not found" indicates terminated session - No automatic session recovery ## Documentation Updates ### 1. README.md - Removed all conversational examples - Added real MCP tool call examples with JSON - Created feature status table - Added complete debugging workflow example ### 2. Roadmap.md (NEW) - Documented all unimplemented features - Added priority levels - Included known limitations - Created implementation timeline ### 3. docs/tool-reference.md (NEW) - Complete API reference for all tools - Actual parameter types and requirements - Real response formats from testing - Error responses documented - Best practices section ### 4. docs/usage.md - Replaced theoretical examples with tested ones - Added complete debugging workflow - Documented common errors and solutions - Added implementation details section ### 5. docs/quickstart.md - Updated with real configuration examples - Added working debugging scenario - Included troubleshooting tips - Emphasized key gotchas ## MCP Server Configuration The tested configuration for Claude Desktop: ```json { "mcpServers": { "mcp-debugger": { "command": "node", "args": ["C:/path/to/debug-mcp-server/dist/index.js", "--log-level", "debug", "--log-file", "C:/path/to/debug-mcp-server/logs/debug-mcp-server.log"], "disabled": false, "autoApprove": ["create_debug_session", "set_breakpoint", "get_variables"] } } } ``` ## Recommendations ### For Users 1. Always save session IDs immediately after creation 2. Use get_scopes before get_variables to get the correct reference 3. Set breakpoints on executable lines only 4. Handle session termination errors gracefully ### For Developers 1. Implement the three missing tools (high priority) 2. Fix breakpoint verification to show true when appropriate 3. Improve session persistence and recovery 4. Add better error messages for common mistakes 5. Consider adding session auto-recovery ## Conclusion The mcp-debugger is functional for basic Python debugging with clear limitations. The documentation has been completely rewritten to accurately reflect the actual implementation, removing all misleading conversational examples. Users now have accurate information about what works, what doesn't, and how to use the tools correctly. The server successfully provides step-through debugging capabilities for Python via MCP, making it possible for AI agents to debug code programmatically. With the three unimplemented features completed, it would be a comprehensive debugging solution. --- *Report generated after comprehensive testing on 2025-06-11*