Skip to content

[lldb-dap] pathFormat in initialize request is treated as mandatory #170171

@Calcoph

Description

@Calcoph

On version 21.1.6, installed via winget install LLVM.LLVM:

On an initialize request, lldb-dap errors if the pathFormat argument is not present. However, it is marked as an optional parameter in the DAP especification: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Initialize

As seen in the following example:

C:\Users\calcoph>lldb-dap --version
lldb-dap: LLVM (http://llvm.org/):
  LLVM version 21.1.6
  Optimized build.
liblldb: lldb version 21.1.6
C:\Users\calcoph>lldb-dap
Content-Length: 87

{"seq":1,"command":"initialize","type":"request","arguments":{"adapterID":"aaaaaaaaa"}}
Content-Length: 283

{"body":{"error":{"format":"invalid arguments for request 'initialize': missing value at arguments.pathFormat\n/* error: missing value */\n{\n  \"adapterID\": \"aaaaaaaaa\"\n}","id":3,"showUser":true}},"command":"initialize","request_seq":1,"seq":0,"success":false,"type":"response"}DAP session error: expected 'Content-Length: ' and got '
'

This issue was apparently fixed in PR #155238, but that was merged in august, so this version should have that fix.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions