Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup native remote debugging?

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)?

like image 274
Mark Ingram Avatar asked Feb 26 '26 07:02

Mark Ingram


1 Answers

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.

like image 136
Steve Streeting Avatar answered Feb 27 '26 22:02

Steve Streeting



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!