-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
debugee fails to launch with native vscode-cpptools on WSL #2870
Comments
@therealkenc Can you try and change difference here would be we are now relying on VS Code to do all the terminal work such as launching it. I'm wondering if this is part of the problem and would at least give us some indication on which path its going down. |
I'll take a look when I have some time to set up an environment. Thanks for the instructions. |
I've tried all the usual suspects. Ditto on the "some time" to get you whatever logs are available (I haven't enabled logging before and need to look into it). Appreciate the reply; thanks. |
I think I have a half-educated guess. In To be clear, it doesn't matter whether The only problem with this line of reasoning is I tried installing [ed] To put it maybe a better way: The people over in #2842 who managed to work around the problem by setting |
@therealkenc the code to use gnome-terminal within our extension has been removed as of 0.20.0 in favor of relying on VS Code to handle terminal launching. If VS Code has a requirement for gnome-terminal or xterm that would be surprising. |
They wouldn't. Speculated maybe they would use |
@therealkenc ah ok. I understand now. for #2842, that is something I need to investigate also. I'll let you know what I find there. |
Thanks. I think maybe ping the people upstream who wrote the "handle terminal launching" to which you are now deferring but were doing yourself previously (Daniel maybe?). Perhaps this isn't even your wheelhouse. But one unanswered question is why this isn't taking down all the debug extensions, but demonstrably affects cpptools. The guy who submitted WSL#3679 claims Python debugging is fine (I don't 'do' Python and couldn't tell you). But in any case, I am pretty convinced there is going to be a pretty straightforward explanation if the right people are asked. [I'm also pretty convinced the same underlying problem is what is borking the #2811 scenario. I am not a big believer in coincidences, and these reports all came out within days of the 1.29 VS Code release. But we can revisit 2811 later.] |
Rolling back to a previous version of |
As of January 8, 2019, there is still no newer version of 'vscode-cpptools', hence the issue still there. |
Yes it is the New Year. We're presently at an impasse on this one (and #2842) because turning on debug traces doesn't yield any meaningful insight. At launch the control flow black-holes inside vscode proper and vscode-cpptools doesn't even get the chance to fail. In the absence of someone familiar with the changes made in |
This issue persists on the latest version of cpptools built directly from GitHub code with code-insiders 1.31.0. However I found some clue by debugging the extension sources. The exception is listed below. It seems the debug adapter failed to spawn.
My current workaround is by using a third-party extension called Native Debug for C++ debugging. Don't know if anyone have better solutions. |
Please do your test inside This said, are you getting the same behavior with your private build -- which is a no error popup just the red stop square sitting there but no launch (contrast some kind of error notification)? You have a The problem has to do with launching the terminal (internal or external) not To reiterate in case it is being lost: Launching used to work for a year until the ~0.20 release. It is not vscode proper that changed either, because if I hold at cpptools 0.18.1 it is fine, despite VS Code marching forward for over a month. |
I figured it out. The error that I was getting is probably due to my build configuration. Good news is I tried the latest insider build (0.21.0-insider3) of this cpptools extension, it seems to work correctly for me with "externalConsole" set to false. However, it will get the same problem ( no error, red stop button, blue indicator running ) when using external terminal. |
The 0.21.0 update was released. This issue seems to be solved. |
The internal console appears to be working again in 0.21.0. Thanks. The external console may still result in the reported behavior if vscode can't launch the default terminal program (typically You can reproduce this fairly easily on 0.21.0 with VS Code 1.30.3 on Real Ubuntu. Temporarily do:
Start debugging with the external console. It will fail (duh) but there is no indication to the user as to why. I believe VS Code proper (contrast the extension) thinks the debugger is running. Please include some feedback in the UX so the user knows what went wrong. In the synthesized case above, that would be something like a popup indicating I'll post a follow-up in WSL#3679 (which isn't Pierson's problem), but it would be a useful to improve the failure path for the external debug console. |
Oh hell yeah! It worked on my WSL Ubuntu 1810! |
@therealkenc when we made our |
That link is about the shell not the terminal. There is no setting in VS Code (that I know of, anyway) that specifies the path or arguments to the terminal program. I am not even sure how VS Code determines the default terminal. The default happens to be The specific ask is that they get some kind of feedback when their external console terminal fails to launch. The shell (be it |
@therealkenc I agree that there should be some feedback when it can't be launched and I'll go open an issue on their side. The |
Filed: microsoft/vscode#67296 |
Awesome. That is very good to know - thank you so much for your help Pierson. So the applicable settings are:
You'll find that is the magic answer to everyone's #2842 problems as well. That |
Calling this a wrap. |
[back here from #2998 so the setting doesn't get more burried than it needs to....]
I kind of figured; the non-obviousness isn't on you. It also apears that this was all a side-effect of addressing two-digit #35. No good deed goes unpunished. |
Correct. The original complaint is that we were rolling our own terminal support and only supporting xTerm and gnome-terminal so when we switched, it seems the users of our extension who expected it to just "work" were now stuck trying to figure out the "new" VS Code angle of it. |
VSCode 1.29.1 and vscode-cpptools 0.20.1. No other extensions.
Confirmed with builds 18282 and 17134.
Ref #2811 and WSL#3679. This is with pure native Linux VS Code on WSL. Application fails to launch.
launch.json
here and test code here for pedantry.gcc -g hello.c
.Continuing from #2811 ...
Correct. There is no win32 VSCode or extension involved in the scenario.
You'd think so. But vscode-cpptools stopped working on WSL recently. I haven't been able to dissect exactly what "recently" means yet, but I suspect it is 0.20.0+ (or we would have heard about it earlier).
This is going to be due to either:
systemd(1)
or reallogin(1)
] orI'll start bisecting and get you logs. I haven't deep dove yet. In the mean time any wild ass guesses as to what might have changed are appreciated. All things being equal, yes, this is a "it should work" situation. It did, now it doesn't. Plot is figuring out why.
[ed: Outline of installing native VSCode on WSl here if you feel like playing along.]
The text was updated successfully, but these errors were encountered: