Linux VM上的VS2017 C ++远程调试 [英] VS2017 C++ Remote debug on Linux VM

查看:64
本文介绍了Linux VM上的VS2017 C ++远程调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我已经设置了一个Ubuntu VM并配置了SSH。我使用默认代码在VS2017上创建了一个Linux C ++项目:

#include <cstdio>

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



VS能够推送和构建VM:

VS is able to push and build on the VM :

1>------ Rebuild All started: Project: ConsoleApplication2Linux, Configuration: Debug x64 ------
1>Cleaning remote project directory
1>Validating architecture
1>Validating sources
1>Copying sources remotely to '192.168.56.101'
1>Starting remote build
1>Compiling sources:
1>main.cpp
1>Linking objects
1>ConsoleApplication2Linux.vcxproj -> c:\Users\...\documents\visual studio 2017\Projects\ConsoleApplication2Linux\ConsoleApplication2Linux\bin\x64\Debug\ConsoleApplication2Linux.out
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========



但是当需要远程启动调试时,它会说:

but when it is time to start the debug remotely it says :


警告:无法插入断点-1无法访问地址0x530处的内存

Warning : Cannot insert breakpoint -1 Cannot access memory at address 0x530


我缺少什么?似乎无法加载符号,但我不知道为什么。

=添加了线程组, id =" i1" GNU gdb(GDB)7.9版权所有(C)2015 Free Software Foundation,Inc。许可证GPLv3 +:GNU GPL版本3或更高版本

< http://gnu.org/ licenses / gpl.html>这是免费软件:您可以免费使用b $ b来更改和重新分发。没有任何担保,在法律允许的范围内为
。 键入"显示复制"和"显示保修",用于支付b $ b详细信息。此GDB配置为" - host = i686-pc-mingw32

--target = x86_64-linux-gnu"。键入"show configuration"以获取配置详细信息。有关错误报告说明,请参阅:

< http://www.gnu.org/software/gdb/错误/>。在线查找GDB手册和其他

文档资源:

< http://www.gnu.org/software/gdb/documentation/ >。如需帮助,请键入

" help" ype"apropos word"搜索与"word"相关的命令。

= cmd-param-changed,param =" pagination",value =" off"此时已加载"加载的共享库"。无法找到或打开符号文件。

=thread-group-added,id="i1" GNU gdb (GDB) 7.9 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html> This is free software: you are free
to change and redistribute it. There is NO WARRANTY, to the extent
permitted by law.  Type "show copying" and "show warranty" for
details. This GDB was configured as "--host=i686-pc-mingw32
--target=x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other
documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>. For help, type
"help". Type "apropos word" to search for commands related to "word".
=cmd-param-changed,param="pagination",value="off" Loaded 'shared libraries loaded at this time.'. Cannot find or open the symbol file.

如果我直接在Ubuntu上启动程序就行了。


推荐答案

亲爱的朋友,

Dear friend,

这可能是VS2017中已知的兼容性问题15.3.0预览2.1 / VCLinux 1.0.7

It could be the compatibility issue which is known in VS2017 15.3.0 Preview 2.1 / VCLinux 1.0.7

你可以参考此主题获取有关此问题的更多信息。

You may refer to this thread to get more info of talking about this issue.

 

祝你好运,

Fletcher


这篇关于Linux VM上的VS2017 C ++远程调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆