是否可以使用Visual Studio远程调试VirtualBox? [英] Is it possible to remote debug a VirtualBox with visual studio?

查看:185
本文介绍了是否可以使用Visual Studio远程调试VirtualBox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Sun的开源 VirtualBox 上运行应用程序的不同版本,是否可以进行远程调试从带有Visual Studio的主机OS中下载该应用程序?问题是,在Visual Studio中,当我想连接到远程计算机时,必须输入计算机名或IP,并且无法从主机ping通从虚拟框中获得的IP.

I'm running different versions of our application on Sun's open source VirtualBox, is it possible to remote debug the app from the host OS with Visual Studio? The problem is that in Visual Studio when I want to attach to a remote machine I have to enter either a computer name or IP and the IP I get from within the virtual box isn't pingable from the host machine.

我主要是对调试本机代码感兴趣(因此我无需身份验证即可运行),但是如果还有调试托管代码的方法,请告诉我.

I'm primarily interested in debugging native code (so I can run with no authentication) but if there's a way to debug managed code too please let me know.

我应该注意,主机操作系统是Vista,而来宾操作系统是XP.

I should note that the host OS is Vista and the guest is XP.

感谢Mark,我的工作顺利,我会记下我必须采取的所有步骤,以备将来参考:

Thanks to Mark I got things working, I'll note all the steps I had to take for future reference:

  1. 将VM网络从NAT更改为Bridged Adapter(必须先关闭VM电源)
  2. 在来宾操作系统中,将默认安全设置更改为Classic - local users authenticate as themselves作为此处描述:

  1. Change the VM network from NAT to Bridged Adapter (have to power off the VM first)
  2. In the guest OS change the default security setting to Classic - local users authenticate as themselves as described here:

  • Control Panel -> Administrative Tools -> Local Security Policy
  • Local Policies -> Security Options
  • Network access: Sharing and security model for local accounts更改为经典-本地用户以自己的身份验证
  • Control Panel -> Administrative Tools -> Local Security Policy
  • Local Policies -> Security Options
  • Change Network access: Sharing and security model for local accounts to Classic - local users authenticate as themselves

重新启动来宾操作系统

  • 如果msvsmon不能自己做
  • firewall.cpl
  • If msvsmon can't do it by itself
  • firewall.cpl

推荐答案

听起来您的来宾设置具有netowking适配器的NAT.进入来宾设置,选择网络,如果网络类型为NAT,则将其切换为桥接. NAT产生的地址范围不是公共的.而通过桥接将为来宾操作系统提供与主机位于同一子网上的IP.

It sounds like your guest setting have NAT for the netowking adapter. Go into the guest setting, choose networking and if the type of network is NAT switch it to Bridged. NAT produces an address range that is not public; whereas, bridged will give the guest OS an IP on the same subnet as the host.

这篇关于是否可以使用Visual Studio远程调试VirtualBox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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