daveleroy / SublimeDebugger

Graphical Debugger for Sublime Text for debuggers that support the debug adapter protocol
MIT License
369 stars 42 forks source link

Any way to connect directly? #191

Closed MetalSlime0 closed 1 year ago

MetalSlime0 commented 1 year ago

I'm making a language that supports the DAP directly - like, you can just connect to the executable running the code on a local port and start sending DAP messages. Is there any kind of "passthrough" adapter that would do this? (Obviously it would only support "attach" and not "launch".) If not, is it easy to make?

daveleroy commented 1 year ago

Make an AdapterConfiguration for it like all the other adapters it should be a tiny amount of code since all you are doing is grabbing the port to connect from the configuration and returning a dap.SocktTransport from the start method.

https://github.com/daveleroy/sublime_debugger/tree/master/modules/adapters

MetalSlime0 commented 1 year ago

Thanks. Is this something I would have to submit a pull request for or is there a place users could just copy the file?

daveleroy commented 1 year ago

You should be able to place a file in the Packages directory and it will be picked up. All AdapterConfiguration subclasses are registered during plugin_loaded.

MetalSlime0 commented 1 year ago

Great, thanks!