Saturday, December 12, 2009

Remote debugging in VS 2005 and latter.

To start remote debugging on a client machine you need to run the msvcmon.exe in remote client machine. Visual studio need not to be installed on client machine. To install the msvcmon.exe in your client machine and start debugging do the followings steps-

1. Find the "Remote Debugger" folder under your installation directory for visual studio 2005 "Common7\IDE\". If your running Visual Studio 2008 than the path will be "Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger".

2. Copy this entire directory to the client machine that is running your process. You can put it in any directly anywhere on the drive.

3. Make sure that you have copied the pdb file (program database) on the client machine where your binaries are located and the binaries from the same code base you are having in your dev machine.

4. Launch your application and than launch msvsmon.exe.

5. When you run msvcmon.exe you may get some dialog that pop up that indicate your Sharing and security model is set for guest, just click Yes. If your firewall block remote debugger than unblock it.

6. In the msvcmon.exe go to Tools/Options. Where the group box says Authentication Mode, select No Authentication, click on Allow any user to debug and click OK.

7. On your dev machine in Visual Studio go to Tools->Attach to process (Ctrl-Alt-P) and open up the Attach to Process dialog. Change the Transport to Remote (Native only with no authentication). In the Qualifier box browse for your client machine on the network.Once you find your target machine the Attach to Process dialog will refresh with the processes that are running on the other system.

8. Attach to you application and start debugging.

No comments:

Post a Comment