openlawlibrary / pygls

A pythonic generic language server
https://pygls.readthedocs.io/en/latest/
Apache License 2.0
563 stars 102 forks source link

Add support for debugging servers in the VSCode Playground #425

Closed alcarney closed 8 months ago

alcarney commented 8 months ago

This adds back the ability for language servers to be debugged through the example VSCode extension. Rather than make the user launch the client and server separately and using a TCP connection, the extension now uses the official Python extension to wrap the server in a debug adapter and automatically starts the debug session.

To debug the server set the pygls.server.debug option to true.

This will go towards #424 (though the docs will still need to be updated)

Code review checklist (for code reviewer to complete)