Visual Studio 2013 remote debug process in Windows XP

ぐ巨炮叔叔 提交于 2019-12-19 03:24:31

问题


I have a development machine running Windows 7 and Visual Studio 2013. The target framework is .NET 3.5.

Now I want to remote debug on a Windows XP system but this seems impossible:

  • msvsmon.exe does not start
  • installing remote tools from http://msdn.microsoft.com/en-us/library/bt727f1t.aspx does not work

All I can find from MS is to use VS Studio 2010 Express for debugging.

Is there any hack to remote debug in windows xp anyway?


回答1:


Sorry for the inconvenience, but since the remote tools are freely available for each version, we have made the decision that the cost to keep backward compatibility working is not something we can afford. Additionally, starting with VS2012 we use an entirely new remote communication channel and protocol compared to VS2010.

You can use VS2010 client on another machine for remote debugging. Alternatively, you can use VS2010 locally on Windows XP for debugging your application as an exe project (even if you built it in a newer version of VS): http://msdn.microsoft.com/en-us/library/0bxe8ytt%28v=vs.100%29.aspx, and in case of C++ you can use VC++ 2010 Express that is freely available: http://www.visualstudio.com/downloads/download-visual-studio-vs#DownloadFamilies_4.

Thanks! Maria Ghiondea Visual Studio Debugger




回答2:


This is a bit late, I know, but I found a way to do this, for native C++ at least. You can do it with Visual Studio 2005. Just build your project in the usual way (with Visual Studio 2015 now, in my case), and then:

  • Install VS 2005 on your development machine.
  • Copy the VS 2005 remote debugging tools to the target machine (or you can access them via a network share).
  • In VS 2005, create an empty project to debug from.
  • Configure the debugging options in this project to use the remote debugger. You also have to tell it the path to the target executable, as seen by the target machine (mine is accessed via a network share, so I don't have to copy it across every time I build it) and the name or IP address of the target machine.
  • Start the VS 2005 remote debugger stub on the target machine (msvsmon.exe).
  • Start debugging (in VS 2005) on the host machine.

The executable should then start up on the target machine and all the usual features of the debugger should be available to you.

The command I use to launch the remote debugger stub on the target machine is as follows (I'm behind a firewall, so I don't need any security):

"Y:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x86\msvsmon" -noauth /nosecuritywarn

Where Y: is mapped to the C: drive on my development machine.

Some other tricks you will probably need are:

  • Configure the connection type in your VS 2005 remote debugging options as 'Remote with no authentication'.
  • Login on the target machine with the same userid and password as you are using on the development machine.
  • If your target machine is running in a VM, you might need to tweak
    the network setup for that VM to be able to connect to it. I got it to work easily enough for Virtual Box, but I can't speak for other VM hosts.

Other, more secure, setups are no doubt possible.

I'd like to sign off by saying how incredibly cool I find it that this works. Other than the above, I didn't need to copy or install anything on the target machine and it has changed my life.

Microsoft, PLEASE don't break this, and please keep Visual Studio 2005 available on MSDN for 'the rest of us' who still support older versions of Windows. No debugger = no productivity.



来源:https://stackoverflow.com/questions/23087644/visual-studio-2013-remote-debug-process-in-windows-xp

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