Swift LLDB and Diff Patch Model Context Protocol Server

Hi Swift community,

I've gotten quite used to needing AI-enabled code editors like Cursor and Windsurf. But I've noticed that often the LLM while debugging has to write a lot of print statements during test driven development to inspect variables. Reminds me of human debugging with console.log. I thought that this was rather inefficient and noticed that there could be a link between Model Context Protocol and Swift's LLDB.

I'm exploring the idea of building a debugging MPC server for Swift.

Key proposed features:

  1. Source Control Integration
  • Real-time diff/patch file handling
  • File change notifications
  • Patch application management
  1. Debugging Support (via LLDB integration)
  • Variable inspection and modification
  • Step over/into/out debugging controls
  • Dynamic breakpoint management
  • Call stack visualization and navigation

Implementation approach:

  • WebSocket-based protocol for real-time communication
  • LLDB Python bindings for debugger control
  • Platform-agnostic design to support iOS, macOS, and Linux development

Questions for the community:

  1. Would this kind of tool be valuable for your Swift development workflow?
  2. What additional features would you want to see?
  3. Are there existing solutions that partially solve this that we should consider integrating with?
  4. Would you be interested in contributing to this effort?

I've started prototyping this and would love to get the community's thoughts before investing more time in the implementation.

Best,

Max

3 Likes