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

Unexpected GDB output from command "-interpreter-exec console #2236

Closed
EricGT opened this issue Jun 20, 2017 · 6 comments
Closed

Unexpected GDB output from command "-interpreter-exec console #2236

EricGT opened this issue Jun 20, 2017 · 6 comments
Labels

Comments

@EricGT
Copy link

EricGT commented Jun 20, 2017

  • Your Windows build number:

Version 10.0.15063

  • What you're doing and what's happening:

Running first example from Visual C++ for Linux Development

#include <cstdio>

int main()
{
    printf("hello from WSL_example_01!\n");
    return 0;
}

Pressing F5

  • What's wrong:

Received error message:

Unable to start debugging.
Unexpected GDB output from command "-interpreter-exec console "target remote localhost:5785"".
Remote connection closed.

  • What should be happening instead:

Normally with a Windows build on a Windows machine the Windows source code is checked to see if any changes have been made and if changes have been made a build is started.

With Visual C++ for Linux Development the Windows source code checks to see if any changes have occurred, and should also check that the Linux copy is in sync with the Windows source code. The problem is that Visual C++ for Linux Development does NOT also check that the Linux copy is in sync with the Windows source code.

How I ran across this problem was that the example ran cleanly when running with Ubuntu 14.04. Then I did a full uninstall using lxrun /uninstall /full and then a clean install for Ubuntu 16.04.2 LTS, installing packages such as build-essentials, gdbserver, ssh, etc. I did NOT copy the Windows source code to WSL. After this I when back to my normal routine. When working with the example again I naturally pressed F5 and expected it to compile if necessary and run, but instead received the error message.

Related SO question with my answer.

Workaround:

Using Visual Studio menu: Build -> Rebuild Solution
This will force the Windows source code to be copied to WSL and then the Linux executable should be created for GDB to find.

I know this is probably not group for this issue, but this is probably the group most likely to run into this problem at this time.

I also did a search for the error message in the issues and found none. If this is a duplicate issue, my apologies.

Again, my complements and thanks to all the groups working to make WSL successful.

@therealkenc
Copy link
Collaborator

This is spiritually the equivalent of: "If you scp a file from box A to box B, box A doesn't notice the changes on B". So, yeah...

The Big Fix™ is going to be Visual Studio not copying the files in the first place. You can vote for that here.

If you are into this sort of thing, vscode-cpptools also recently added support for WSL. All pretty cool stuff.

@Zedonboy
Copy link

Hello, i tried rebuilding it gives me this error

Exception occured
while copying
sources to remote
machine-illegal characters
in path

how do i go about this?

@benhillis
Copy link
Member

What do they mean by illegal characters? The error is probably due to the windows paths in the $PATH variable, however spaces and parens aren't illegal path characters on Linux just uncommon.

@Zedonboy
Copy link

so where should i be changing PATH variables. at my project proprties am seeing lots of things that can be change. can you hint me want i should do please?

@Zedonboy
Copy link

well change the remote project directory to '/projects'................
now this error 'cannot create directory mkdir error'

@therealkenc
Copy link
Collaborator

therealkenc commented Jan 28, 2018

The question in the OP would best be addressed in the Visual Studio For Linux community here. The system does work (to a first order ) with WSL as it does with Real Linux. Ref #2505.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants