Is it possible to remote debug a VirtualBox with visual studio?

随声附和 提交于 2019-12-03 01:53:43

问题


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.

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


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

  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
    • Change Network access: Sharing and security model for local accounts to Classic - local users authenticate as themselves
  3. Reboot guest OS

  4. Disabled the firewall on the guest OS
    • If msvsmon can't do it by itself
    • firewall.cpl

回答1:


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.



来源:https://stackoverflow.com/questions/1584939/is-it-possible-to-remote-debug-a-virtualbox-with-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!