dap-mcp
Features
- **Debug Adapter Protocol Integration:** Interact with debuggers using a standardized protocol.
- **MCP Framework:** Leverage MCP to optimize context and enhance debugging workflows.
- **Rich Debugging Tools:** Set, list, and remove breakpoints; control execution (continue, step in/out/next); evaluate expressions; change stack frames; and view source code.
- **Flexible Configuration:** Customize debugger settings, source directories, and other parameters via a JSON configuration file.
Installation
Prerequisites
- Python 3.10 or higher
- [uv](https://github.com/astral-sh/uv) (optional, for running the server)
Installing and Running the Server
Configuration
- The path to the debugger executable and its arguments.
- The source directories for resolving file paths during breakpoint operations.
- Other settings (such as module, working directory, and interpreter path) necessary for launching the debuggee.
Available Debugger Types
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
Available Tools
- **launch:** Launch the debuggee program.
- **set_breakpoint:** Set a breakpoint at a specified file and line (with an optional condition).
- **remove_breakpoint:** Remove a breakpoint from a specified file and line.
- **list_all_breakpoints:** List all breakpoints currently set in the debugger.
- **continue_execution:** Continue program execution after hitting a breakpoint.
- **step_in:** Step into a function call.
- **step_out:** Step out of the current function.
- **next:** Step over to the next line of code.
- **evaluate:** Evaluate an expression in the current debugging context.
- **change_frame:** Switch to a different stack frame.
- **view_file_around_line:** View source code around a specified line (using the last provided file if none is specified).
- **terminate:** Terminate the debugging session.
Extending with Other DAP Servers
- Define a unique `type` value (using a `Literal`) to act as a discriminator.
- Include any additional fields or settings specific to that debugger.
Contributing
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Write tests and ensure all checks pass.
- Submit a pull request.