Remote Debugging

1. Examine the exe to debug in dependency walker. Again recursively check the dependencies in dependency walker of the found binaries.

 

2. Build all binaries in debug mode.

 

3. Copy the exe and dlls to appropriate folder in remote machine. You can copy all the debug binaries on remote machine.

 

4.i. Copy the msvcp80d.dll, msvcr80d.dll and msvcm80d.dll binaries from c:\windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f path to path of these binaries on remote machine. For the correct path see path in dependency walker of the above dlls.

 

ii. Also copy the debug CRT manifest file and cat files for these files from Windows\WinSxs folder.

For example, manifest file for the above path is x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f.manifest and x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f.cat.

 

iii. Rename the files to simply Microsoft.VC80.DebugCRT.menifest and Microsoft.VC80.DebugCRT.cat.

 

5. Install msvsmon.exe from C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x86 on remote machine and configure it for no authentication.

 

6. In Visual studio, open attach process window and select "Remote (Native only with no authentication)" and give IP address of the remote machine. The remote processes will appear in the process list. Attach the needed process and start debugging.

No comments: