如何设置本机远程调试?
每次我尝试设置远程调试时,总是会导致痛苦。为了在远程计算机上调试我的 MFC 应用程序,我需要做什么?我使用的是 Windows 7,虚拟机使用的是 Windows XP。
我已经在远程计算机上运行了 msvsmon,并且已成功连接,但我遇到的问题是虚拟机无法启动我的调试 exe,因为它显示:
该应用程序无法启动 因为应用程序配置 是不正确的。重新安装 应用程序可能会解决这个问题 (14001)。
我已经安装了 VC Runtime Redist,我已将 MFC / CRT 非 redist 调试文件复制到 VM 上(并复制到与程序相同的目录中)。我尝试遵循此博客文章中编辑清单文件版本信息的建议 - http://qualapps.blogspot.com/2008/07/visual-studio-2008-c-redistributable.html。但似乎没有什么能够让它发挥作用。
我使用 Dependancy Walker 检查了 MyAppD.exe,它给了我同样的错误(关于并排程序集加上上面的文本)。
有没有人有一个万无一失的方法来让这些东西工作(在干净的虚拟机上)?
Everytime I try to setup remote debugging it always results in a world of hurt. What do I need to do, in order to debug my MFC application on a remote machine? I'm using Windows 7, the VM is using Windows XP.
I've got msvsmon running on the remote computer, and I've connected successfully, but the problem I'm having is the VM can't launch my debug exe because it says:
This application has failed to start
because the application configuration
is incorrect. Reinstalling the
application may fix this problem
(14001).
I've installed the VC Runtime Redist, I've copied the MFC / CRT non-redist debug files onto the VM (and into the same directory as the program). I've tried following the advice of editing the manifest file's version information from this blog post - http://qualapps.blogspot.com/2008/07/visual-studio-2008-c-redistributable.html. But nothing seems to be able to get it to work.
I've inspected MyAppD.exe using Dependancy Walker and it gives me the same error (about side-by-side assemblies plus the text above).
Does anyone have a fool-proof method for getting this stuff working (on a clean VM)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题可能是您正在使用应用程序的调试版本,但您已经安装了发布版 C++ 运行时。实际上,您需要在远程计算机上安装调试 C++ 运行时才能在其上运行调试应用程序。
自 MSVC 2005 以来,C++ 运行时一直是并排程序集,这使得安装它们比以前更加复杂(以前您可以只复制 msvcrt71d.dll 等)。我在几年前(2005 年)写了一篇关于我设置它的经验的博客文章,我相信同样的原则仍然适用。
http://www.stevestreeting.com/2007/10/25/远程调试提示/
希望有帮助。
The problem is probably that you're using a debug build of your application, but you've installed the release C++ runtime. You actually need to have the debug C++ runtimes installed on the remote machine in order to run a debug application on it.
Since MSVC 2005, the C++ runtimes have been side-by-side assemblies which makes installing them a little more complex than it used to be (time was you could just copy the msvcrt71d.dll etc across). I wrote a blog article about my experience setting it up a few years ago (with 2005), and I believe that the same principle still applies.
http://www.stevestreeting.com/2007/10/25/remote-debugging-tips/
Hope that helps.
我只是没能成功解决这个问题。我唯一的解决办法是安装与我使用的相同版本的 Visual Studio,并安装和配置远程调试所需的一切。这是一个巨大的杀伤力,但它确实起到了作用。
I just haven't been able to solve this successfully. The only work around I have is to install the same version of Visual Studio that I use, and that installs and configures everything I need for remote debugging. It's a massive overkill, but it does the trick.