-
Notifications
You must be signed in to change notification settings - Fork 10
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
pytest-lsp
: See server's STDERR in pytest output
#143
Comments
Tried to make this work, seems harder then I'd hoped. I took the capturing that happens in It seems like Another option would be to not use |
I tend to forward the server's log output via But I agree, having |
Just tried it out, looks like it should work! I'll try and get something out to play with soon. |
for _ in range(10):
print("Hello stderr.\n", file=sys.stdout)
Forget that, I typoded
I could find out that I didn't actually log to I want to try out what happens when the coroutine is replaced by a thread. Don't know if it would be a good solution, but I wanna see what happens. UPDATE: The thread solution doesn't seem to be so promising either. Since the subprocess is started by the TL:DR: Sorry for this mess of a comment. I've tested the code in your PR and it works as desired. |
No worries! It's exciting to see someone interested enough in this that they're willing to get hands on with it! |
|
This works like a charm. Configure your server logger with |
Or: How to debug the server behind pytest?
For debugging, I usually
Unfortunately I haven't found a way to access the logs of my server with
pytest-lsp
in a nice way. I think it would be great to see the server's STDERR output in the console right next to the test results (or have an option for this behaviour), just as pytest does by default when working with pure Pyhon systems. I think this could work by just forwarding the server subprocess' STDERR to the test process STDERR.My current workaround is to have my server log to a file and check that in another terminal, but that's kind of tedious.
The text was updated successfully, but these errors were encountered: