-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
External debug adapter crashes when launched without redirected stdout #56483
Comments
(Experimental duplicate detection)
|
I don't understand what you mean by "When launching the debug adapter without modifications to stdout"? Usually VS Code launches the debug adapter and then communicates with it through stdin/stdout. What approach are you using? |
@weinand Sorry, if I expressed myself confusingly. I am using the stdin/stdout approach:
I have encountered the following scenarios:
I am having a hard time figuring out the concrete problem, because I have no way of capturing the debug adapter‘s output in a VSCode environment. Whenever I want to see what the debug adapter outputs, I need to redirect stdout - but this will obviously not allow the JSON responses to be read by VSCode. |
How exactly do you run the debug adapter with VS Code? |
Using I hit the same problem though, when hardcoding the path using the |
@weinand I did some further experiments and have created a simple executable that simply writes everything from stdin into a file. When launching this, everything VSCode seems to write is:
After the header, nothing happens. Only after I close the VSCode window, it writes:
I suspect that this causes my debug adapter to wait forever for the initialize command. |
Apparently not a VSCode issue: eclipse-lsp4j/lsp4j#227 |
@weinand Thanks for your prompt support anyway. |
@fwcd great that you were able to find the issue yourself. In general I think there are two approaches for debugging the interaction between a debug adapter and VS Code:
|
I am currently developing a Kotlin debug adapter running on JVM.
When launching the external debug adapter with
stdout
redirected to a file (either usingSystem.setOut()
or throughjava ... > file.txt
), everything works fine. When launching the debug adapter without modifications tostdout
, VSCode yields this error message:and prints the following stacktrace to the developer tools console:
This is problematic, because my debug adapter relies on stdio for JSON-RPC.
Although #41190 would certainly be helpful, I could not find any issue that resembles this exact problem.
The text was updated successfully, but these errors were encountered: