Skip to content

Conversation

@likle
Copy link
Contributor

@likle likle commented Oct 31, 2025

Hi there, this is a bit outside of my expertise but I had some issues running the debugger for C projects, due to the following error: helix_dap::transport [ERROR] err <- DAP session error: expected to not be '0' at (root).seq
The user only sees Failed to start debug client: server closed the stream

it seems like lldb-dap is checking that the sequence number is non-zero:
https://github.com/llvm/llvm-project/blob/main/lldb/tools/lldb-dap/Protocol/ProtocolBase.cpp#L96

The DAP specification says this:

The seq for the first message sent by a client or debug adapter is 1

This made me assume that the lldb-dap check is probably correct. In this pull request I added an increment instead of setting the initial value of the request_counter to 1 in order to maintain the semantic meaning of the variable. This change has only been tested with lldb v21.1.3 with C on linux (arch).

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, thanks! I pushed a change just to add a comment linking to the relevant doc

@the-mikedavis the-mikedavis merged commit 0b61e72 into helix-editor:master Nov 2, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants