Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record and playback? #99

Open
alcarney opened this issue Oct 18, 2023 · 3 comments
Open

Record and playback? #99

alcarney opened this issue Oct 18, 2023 · 3 comments
Labels
enhancement New feature or request pytest-lsp Issues affecting the pytest-lsp package

Comments

@alcarney
Copy link
Member

It might be useful to use lsp-devtools record to capture an LSP session and use pytest-lsp to replay that session and make sure that the server behaves as expected

@alcarney alcarney added enhancement New feature or request pytest-lsp Issues affecting the pytest-lsp package labels Oct 18, 2023
@eliericha
Copy link

Hello!

I tried using lsp-devtools to implement something similar to this issue. I wanted to record a replay file that includes protocol headers such that the session file can be piped directly as input to the server. The benefit of this is being able to pipe the file directly as input to a server for debugging outside the test environment.

I think it would be helpful if lsp-devtools record had an option to record raw messages at the transport level, including headers.

@alcarney
Copy link
Member Author

I think it would be helpful if lsp-devtools record had an option to record raw messages at the transport level, including headers.

You could at one point pass a --capture-raw-output flag to lsp-devtools record and it would do that, but it looks like I broke it! 😅

I will have to look at fixing it at some point - and adding some tests around it!

@eliericha
Copy link

It would be great to fix --capture-raw-output :)

Bu ultimately I think I prefer to use a different method of recording, without lsp-devtools, in order to simplify the architecture and not have to manage an additional subprocess. Hence #195 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pytest-lsp Issues affecting the pytest-lsp package
Projects
None yet
Development

No branches or pull requests

2 participants