-
Notifications
You must be signed in to change notification settings - Fork 0
Add Debug Adapter Protocol (DAP) support #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| const disposer = client.onNotification( | ||
| "marimo/dap", | ||
| ({ sessionId, message }) => { | ||
| Logger.debug("Debug.Receive", "Received DAP response from LSP", { | ||
| sessionId, | ||
| message, | ||
| }); | ||
| if (sessionId === session.id) { | ||
| sendMessage.fire(message); | ||
| } | ||
| }, | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responses from the request handler.
| executeCommand(client, { | ||
| command: "marimo.dap", | ||
| params: { | ||
| sessionId: session.id, | ||
| notebookUri: session.configuration.notebookUri, | ||
| message, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom LSP "command" that wraps a DAP request with additional information (for a request). I assume that the handler will manage its own debug sessions.
| """Command-specific arguments. Should be parsed further in ./debug_adapter.py""" | ||
|
|
||
|
|
||
| def handle_debug_adapter_request( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
barebones request/response. I assume this is where your large conditional thing would go @dmadisetti
452fbcc to
cb0d170
Compare
5e534ff to
f1de986
Compare
cb0d170 to
a177e13
Compare
|
I'm going to make a PR to this PR- but we can sync Monday for upstream merge |
|
I just merged some linting/formatting changes in #6 for the extension code. Would I be able to rebase this branch cleanly for you? |
|
I might get up my pwn branch and close this out. Will manage rebase issues, but ping you if something seems to hairy. Thanks again! |
|
Can we just squash this into main then? Or are your changes a significant departure from this? It would be nice to break up the DAP stuff into separate PRs I think so it's easier to review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy getting this into main if you are!
Enables debugging marimo notebooks in VS Code by forwarding DAP messages between the VS Code debugger and the LSP server. Just a stub now to wire up everything.
1a6a560 to
6484853
Compare
|
Cool, I merged |
Adds initial boilerplate to connect DAP with marimo-lsp. The VS Code extension now forwards DAP messages over LSP, which has access to the session state as well as the document workspace.
Screen.Recording.2025-08-20.at.5.32.05.PM.mov