Skip to content

Support Named Pipe & Unix Domain Sockets as debug adapter entry point #84643

@TylerLeonhardt

Description

@TylerLeonhardt

@weinand asked me to open this here.

With the vscode API there is a type called DebugAdapterDescriptorFactory - there is even a dynamic registry for it.

AFAIK, this is good for:

In the PowerShell Debug Adapter, we use a named pipe/unix domain socket to talk to vscode via LSP and DAP so unfortunately, we have to maintain a stdio bridge that bridges stdio to our named pipe.

Can we allow DebugAdapterDescriptorFactory to accept a net.Socket or similar as the stream used to send messages to/from the server?

Or allow DebugAdapterServer to take in a pipe name/path?

That's basically what we're using in the bridge.

net.Socket would support both named pipes and TCP sockets all in one.

Just for context, we chose a named pipe/unix domain socket because:

  • We couldn't go the stdio route because PowerShell Editor Services is both a language server and a debug adapter that share state.
  • It's much easier to secure a glorified file (aka named pipe) than a TCP socket. ACL the file and you're done. (Makes me think if there are language servers out there that are exposing insecure TCP sockets...)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions