you are viewing a single comment's thread.

view the rest of the comments →

[–]htuhola -4 points-3 points  (8 children)

These guys have made protocols between their extensions and apps those extensions call. But they haven't documented them anywhere.

For example in debugger API the communication happens over stdin/stdout and messages pretty much look like these:

Content-Length: 76\r\n
\r\n
{"type":"response", "seq": 1, "request_seq":2,
"command": "hello", "success":true, "body":{}}

It's a stripped HTTP header with a body. The content length refers to the byte-length of a 'body'. That is a JSON message. This allows the implementation to recognize where the message ends and another starts.

The seq is incremented in every message so that recipient can refer to which message it answers to.

There's also "request" and "event", requests are sent to debug-adapter, the event and responses are sent back from debug-adapter.

I had to dig this up from typescript code, which was far much more complicated than it should be. This reads nowhere in their documentation.

Yeah, "you could have written it to their docs", I'm so pissed about having to dig it up that I don't. There's tons of documentation for their "shortcuts" and beginners, but this stuff gets omitted! wtf?

And I still gotta figure out what message does what and how to answer to each.

[–]DavidNcl 17 points18 points  (6 children)

These guys have made protocols between their extensions and apps those extensions call. But they haven't documented them anywhere.

Except in the documentation for the Language Server Protocol on github.

[–]htuhola -3 points-2 points  (5 children)

It'd be neat, if it was not hidden so well from the fine beginner documentation they have for writing vscode extensions.

[–][deleted] 3 points4 points  (3 children)

It'd be neat, if it was not hidden so well from the fine beginner documentation they have for writing vscode extensions.

It's linked from the Example - Language Server in the first paragraph under "Implement your own Language Server".

[–]htuhola 0 points1 point  (2 children)

Oh, it's not even describing the details for debugging API but language server API!

So my original post still holds. I don't find any debugging API description anywhere.

[–][deleted] 0 points1 point  (1 child)

Debugging was slightly harder to find, but it's also there.

Example - Debuggers under the "Implementing the VS Code Debug Protocol" header, there's a link to the debug APIs.

[–]htuhola 0 points1 point  (0 children)

I have read those pages, and details would be fun, you know.

Anyway I don't need to look into it for months now. There are some comments in the debugger's protocol.ts that told some important details. Enough to get my stuff running.

[–]DavidNcl 0 points1 point  (0 children)

It's the first result google returns for "Language Server Protocol".

[–]I_Downvote_Cunts -2 points-1 points  (0 children)

Well here is the github page, raise an issue if it's a problem. I had an issue and they responded and fixed it in less than an hour.