Closed gatesn closed 6 years ago
Hi @gatesn, The debug protocol does not conflict because it is run on a completely independent transport. The debug protocol is a spec defined by MS. See https://github.com/Microsoft/vscode-debugadapter-node/tree/master/protocol
For our use case, which is a Monaco front-end talking to language servers over websockets I was hoping to avoid an extra transport link. I suppose it might be possible to modify RemoteEndpoint so we can fiddle method names during registration.
From: Jonah Graham notifications@github.com Sent: Wednesday, January 10, 2018 8:03:10 AM To: eclipse/lsp4j Cc: Nicholas Gates; Mention Subject: Re: [eclipse/lsp4j] Should the debug protocol be namespaced using JsonSegment? (#151)
Hi @gatesnhttps://github.com/gatesn, The debug protocol does not conflict because it is run on a completely independent transport. The debug protocol is a spec defined by MS. See https://github.com/Microsoft/vscode-debugadapter-node/tree/master/protocol
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/eclipse/lsp4j/issues/151#issuecomment-356528323, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB1rdBnW7x6EZkAfqX6ejQ1wa__71T-Oks5tJG6-gaJpZM4RYm9X.
A couple of things to keep in mind. The debug protocol at the lowest level is not JSON RPC2.0, but instead something quite similar. So if you are going to talk to existing debug adapters after transporting over the websocket you need to translate that too.
Additionally, there are fundamental differences in the life cycle of a debug adapter and a language server. Among other things, the debug adapter is stateful. Unlike the language server you can't silently restart a debug adapter.
@gatesn if you really want to do it, you could try creating a subinterface of IDebugProtocolServer and adding a @JsonSegment
to it. We can't change the message scheme in general since that would not work with existing clients / servers.
Oh yes, I forgot a sub-interface would work with the method discovery, thanks!
The idea here is that with a small translation layer, VSCode extensions built around language servers could add debug support.
From: Miro Spönemann notifications@github.com Sent: Wednesday, January 10, 2018 8:31:53 AM To: eclipse/lsp4j Cc: Nicholas Gates; Mention Subject: Re: [eclipse/lsp4j] Should the debug protocol be namespaced using JsonSegment? (#151)
@gatesnhttps://github.com/gatesn if you really want to do it, you could try creating a subinterface of IDebugProtocolServer and adding a @JsonSegment to it. We can't change the message scheme in general since that would not work with existing clients / servers.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/eclipse/lsp4j/issues/151#issuecomment-356534560, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB1rdKJLYz-2_JHT0SLrQR4mouDNQFa_ks5tJHV5gaJpZM4RYm9X.
I notice the debug protocol currently isn't namespaced, meaning it's quite likely to collide with the LSP, or LSP extensions. Would you be opposed to adding
JsonSegment("debug")
?