Repository navigation
v0.2.1: Enhanced Error Messages and Breakpoint Validation
What's New in v0.2.1
New Features
1. Breakpoint Validation Tool
- New
dap_validate_breakpoint_line()tool to proactively validate breakpoint locations - Detects common mistakes: function/class definitions, comments, blank lines, imports
- Provides actionable suggestions for better breakpoint locations
2. Enhanced Error Messages
- Clear, context-rich error messages instead of vague "disconnected unexpectedly"
- Explains WHY connection closed (program exit vs crash with exit codes)
- Provides actionable suggestions for fixing issues
- Differentiates between successful exit (code 0) and crashes
3. Better Exit Detection
_recv()method now includes exit codes in error messages- Helpful tips automatically included in error output
4. Improved Documentation
dap_launchdocstring now includes "Common Pitfalls to Avoid" section- "Recommended Debugging Pattern" with clear examples
- Guidance on avoiding function definition breakpoint mistakes
5. Publishing Guide
- Complete guide for publishing to MCP Registry
- server.json example configuration included
Testing
- Added 17 comprehensive new tests
- All 26 tests passing (9 original + 17 new)
- Test coverage for all new features and error scenarios
Impact
These improvements transform the debugging experience from confusing to clear and helpful:
- ✅ Users understand WHY errors occur
- ✅ Get ACTIONABLE suggestions for fixing them
- ✅ Avoid common mistakes with proactive validation
- ✅ Learn best practices from enhanced documentation
Files Changed
src/mcp_server.py- New validation tool, improved docstringssrc/dap_stdio_client.py- Enhanced error messagestests/test_improved_error_handling.py- 17 new comprehensive testsPUBLISHING_GUIDE.md- MCP Registry publishing instructionspyproject.toml- Version bump to 0.2.1