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
When a debug adapter crashes, the exception text is not propagated to the console #41190
Comments
I don't know if the text "ERR" in the console was actually supposed to be my error; but it isn't. My error was "AAAAAARGH". |
@isidorn Do you mean the If you still want me to try that breakpoint, can you explain how to add a breakpoint there. I did try breaking in my adapter and navigating the callstack (that file wasn't in there anywhere) and also checking the filenames of the files that were (they showed |
@DanTup I mean let's try to see if your error "AAAAARGH" surfaces on our side. |
The breakpoint is not hit, which is perfectly normal since the exception occurs before the socket connection is created. You should be able to reproduce by adding require('unknown_module') to the top of any debugger extension .js file |
Ok, I got breakpoints in both For testing, all I've done is put Though now I think about it; the error isn't occurring in code that's been executed directly by Code - it's during the response from my debugger. In my debug adapter I spawn a process and I add a handler for |
That one (in |
Actually, I think I can repro this really easily by just putting export class DartDebugSession extends DebugSession {
public constructor() {
super();
throw "test";
} |
@isidorn This issue has the needs-more-info tag though I think it's easily reproducible with my last comment. Let me know if that's not the case! |
@DanTup I have removed tha tag and plan to look into this issue this week. Thanks |
Investigated and the issue here is that I am not getting any exception data from the spawned process. @DanTup @ncannasse are all your debug adapters launched using node? If yes then it might be that our |
Yes, using stdfork is the cause here. If I do not use it, I nicely get the error popping up in the extensions output channel. My weekend is starting if someone is feeling smart code review this file and let me know if you find something fishy about stderr not being wired through. |
Then you might want to involve/assign @alexandrudima. |
I am going on a vacation tomorrow evening, and this is like this since forever so pushing to April to investigate with Alex what is going on behind the curatans here. |
I've had a couple of people report debug adapter crashes recently. One of them I'm unable to reproduce which means I need to get more information from the user. Currently, when a debug adapter crashes, the error information that appears in the console is very vague:
The actual exception that was thrown is not shown. Since I can't repro this, the only ways I can think of to debug are:
Is it possible to get better information from the error back into the console without having a debugger attached to debug adapter?
The text was updated successfully, but these errors were encountered: