简体   繁体   English

Windows XP中的Visual Studio 2013远程调试过程

[英]Visual Studio 2013 remote debug process in Windows XP

I have a development machine running Windows 7 and Visual Studio 2013. The target framework is .NET 3.5. 我有一台运行Windows 7和Visual Studio 2013的开发机器。目标框架是.NET 3.5。

Now I want to remote debug on a Windows XP system but this seems impossible: 现在我想在Windows XP系统上进行远程调试,但这似乎是不可能的:

All I can find from MS is to use VS Studio 2010 Express for debugging. 我从MS中找到的就是使用VS Studio 2010 Express进行调试。

Is there any hack to remote debug in windows xp anyway? 是否有任何黑客在Windows XP中进行远程调试?

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. 此外,从VS2012开始,我们使用全新的远程通信通道和协议,与VS2010相比。

You can use VS2010 client on another machine for remote debugging. 您可以在另一台计算机上使用VS2010客户端进行远程调试。 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 . 或者,您可以在Windows XP上本地使用VS2010来调试您的应用程序作为exe项目(即使您在较新版本的VS中构建它): http//msdn.microsoft.com/en-us/library/0bxe8ytt% 28v = vs.100%29.aspx ,如果是C ++,您可以使用免费提供的VC ++ 2010 Express: http//www.visualstudio.com/downloads/download-visual-studio-vs#DownloadFamilies_4

Thanks! 谢谢! Maria Ghiondea Visual Studio Debugger Maria Ghiondea Visual Studio调试器

This is a bit late, I know, but I found a way to do this, for native C++ at least. 我知道,这有点晚了,但我找到了一种方法,至少对于原生C ++来说。 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: 您可以使用Visual Studio 2005来完成。只需以通常的方式构建项目(现在使用Visual Studio 2015,在我的情况下),然后:

  • Install VS 2005 on your development machine. 在开发计算机上安装VS 2005。
  • Copy the VS 2005 remote debugging tools to the target machine (or you can access them via a network share). 将VS 2005远程调试工具复制到目标计算机(或者您可以通过网络共享访问它们)。
  • In VS 2005, create an empty project to debug from. 在VS 2005中,创建一个要调试的空项目。
  • 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. 你还必须告诉它目标机器人看到的目标可执行文件的路径(我的目标机器是通过网络共享访问的,因此我不必在每次构建时都复制它)以及名称或IP地址目标机器。
  • Start the VS 2005 remote debugger stub on the target machine (msvsmon.exe). 在目标计算机(msvsmon.exe)上启动VS 2005远程调试器存根。
  • Start debugging (in VS 2005) on the host machine. 在主机上开始调试(在VS 2005中)。

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 “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. 其中Y:映射到我的开发机器上的C:驱动器。

Some other tricks you will probably need are: 您可能需要的其他一些技巧是:

  • Configure the connection type in your VS 2005 remote debugging options as 'Remote with no authentication'. 将VS 2005远程调试选项中的连接类型配置为“无需身份验证的远程”。
  • 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 如果目标计算机在VM中运行,则可能需要进行调整
    the network setup for that VM to be able to connect to it. 该VM的网络设置能够连接到它。 I got it to work easily enough for Virtual Box, but I can't speak for other VM hosts. 我让它足够容易为Virtual Box工作,但我不能代表其他VM主机。

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. 微软,请不要破坏这一点,请在MSDN上为“我们其他人”保留Visual Studio 2005,他们仍然支持旧版本的Windows。 No debugger = no productivity. 没有调试器=没有生产力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM