llvm / llvm/llvm-project

Create a ProtocolServer plugin for debugpy

Open
#160,215 1 comment 0 reactions 1 assignee Claimed by @JDevlieghere View on GitHub
lldb
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

[debugpy](https://github.com/microsoft/debugpy) is an implementation of the [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) for Python 3. Similar to `pdb` you can use this to debug scripts running under LLDB by including the following snippet in your scripts, or by running it from the embedded command interpreter.

```
import debugpy
debugpy.listen(("localhost", 5678))
```

For MCP, I added the concept of a "ProtocolServer" plugin. We should create such a plugin for `debugpy` and dynamically inject this into the embedded script interpreter. That way folks can run:

```
(lldb) protocol-server start debugpy listen://localhost:59999
```

to start a Python DAP server. If they don't have `debugpy` installed, we can show a meaningful error message.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.