Visual Studio 2015 error: Unable to start debugging. Unexpected GDB output from command "-target-select remote :5039". Remote connection closed

Visual Studio 2015 error: Unable to start debugging. Unexpected GDB output from command "-target-select remote :5039". Remote connection closed

每当我尝试在 "C++" 类别下调试 "Cross Platform" 时,我都会看到以下错误:"Unable to start debugging. Unexpected GDB output from command "-target-select remote :5039" . 远程连接关闭

我在下载 Visual Studio 2015 社区时安装了所有内容,我 运行 它在支持 Hyper-V 的 Windows 10 Pro 上。

我一直在为此寻找解决方案,并且找到了一个假设: "What is your debug target, the VS Android Emulator? When we saw this before it turned out to be a bad emulator image. Do you have this problem with all targets (e.g. if you try a physical device) or just one?" 就我而言,我只是通过 Emulator(VS Emulator 5" Lolipop (5.0) XXHDP Phone (0x86 -...)

进行了尝试

所以我已经向 VS 2015 发送了一封电子邮件。 答案是这样的: "Sorry for the delay in responding we were looking at an emulator image of another user that ran into this problem so I was waiting until we had the results of that investigation to report back. We actually were not able to find anything wrong the emulator itself, our current hypothesis is that it is a network or adb problem interfering with GDB’s ability to connect to GDB server on the remote machine. Do you see this error every time you try to debug, or if you reboot the emulator will it work sometimes right after the reboot? Next time you see the error, can you open the emulator’s console mode by going go the Hyper-V manager and double clicking the emulator. Then find the location your app installed to and run “gdbserver --version" 来自应用程序路径,让我知道它说的是什么?这将验证设备上是否安装了正确版本的 gdbserver。"

所以我们正在努力解决这个问题,但我也在这里问以防万一。 有没有人对这个问题有神奇的解决方案? 如果我弄清楚如何解决这个问题,我会对此发表评论。 提前致谢。

** 以下回答来自 Visual Studio 2015 年的经理:

你只是第二个 运行 进入这个问题的人,也是第一个 运行 进入这个问题的人,当我们 运行 他们的 .vhd 在我们的机器,因此它似乎是一些 st运行ge 问题,其中 gdbserver(来自 Google 提供的 Android NDK)仅在某些机器上 运行ning 时崩溃。不幸的是,您提供的 .vhd 似乎不是正确的文件,它无法为我启动。如果您查看 Hyper-V 管理器中模拟器的设置,您可以看到模拟器正在使用的 .vhd 文件。 .但是鉴于我们得到了其他人的 .vhd,此时您可以推迟提供任何其他信息。我正在等待模拟器团队的回复,看看他们是否有任何想法,因为这似乎只是特定机器上的问题。

如果您不介意我的问题,如果您没有计算机背景,是什么启发您在 Android 上尝试 C++?这种情况将比在 Android 上执行 Java 复杂得多。


我收到这个答复已经差不多两个月了,但我还没有收到他们的任何额外答复。所以,我最终放弃了使用 VS2015 开发应用程序。

如果你运行遇到这个问题,只有两条路可走。更换电脑或停止使用 VS2015 开发应用程序。

如果工程名中包含空格,则整个远程调试失败。 Visual Studio 还会创建奇怪的路径。在签出 "Blink1 for Raspberry Pi" 模板时,我将项目命名为 "Blink1 for Pi",结果路径如下:

~/projects/Blink1?/for/pi/PI/for/pi.... 

而且调试全部失败。当我重新创建它并保留项目名称 "Blink1" 时,一切正常。很遗憾,这里没有处理空格...