Debugging an application remotely on a WES system running WES requires a little setup. The following presents steps for setting up the remote system and the application environment for remote debugging using MSVSMON.exe.
1.       Have your system administrator do one of the following on the WES system:
a.       Add the WES system to the domain give the system a name, in this case use WES-DEVICE. You will need to log onto the WES system using your domain username and password.
b.      Add an account on the WES system and give it administrator rights. You will also need to have the same username and password on the development system and log onto both the WES system and the development system using this name and password. Give the system a name, in this case use WES-DEVICE.
2.       Create and share a folder on the WES system.
a.       Using Windows Explorer, select the C: drive
b.      Select from the menu File\New\Folder
c.       Name the folder Remote
d.      Right click on the new folder and select Sharing and Security
e.      Select Share this Folder and set the permissions so that you can write to the folder from your development system
3.       On your development system:
a.       Map a network drive to the remote C:\Remote folder
                                                               i.      In Windows Explorer select Tools\Map Network Drive
                                                             ii.      Select a driver letter, in this case use Z:\
                                                            iii.      Select the folder named \\WES-DEVICE\Remote
                                                           iv.      If you are logged onto both machines using the same username and password when you click on the FINSH button the drive will map. If not, then log onto both machines with the same username and password.
b.      Find MSVSMON.exe in your Visual Studio installation.
                                                               i.      For VS2005 MSVSMON.exe is in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x86
                                                             ii.      For VS2008 MSVSMON.exe is in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86
c.       Copy all of the files in the folder to the Z: drive
4.       Create a new project and remote debug:
a.       In Visual Studio:
                                                               i.      Select File\New\Project from the menu
                                                             ii.      Select Visual C++ and the Windows Forms template
                                                            iii.      Name the project RemoteDebug
                                                           iv.      Set the location to C:\Src
                                                             v.      Select OKAY
b.      In the Solution Explorer right click on RemoteDebug.cpp and select View Code
c.       Set a breakpoint in the code by clicking on the grey bar next to a line of code
d.      Setup the project for remote debugging:
                                                               i.      Select Project\RemoteDebug Properties from the menu
                                                             ii.      Select Configuration Properties\General and then change the Output Directory to Z:\
                                                            iii.      Select Configuration Properties\Debugging
1.       Change Debugger to Launch to Remote Windows Debugger
2.       Set Remote Command to “C:\Remote\RemoteDebug.exe” – this is relative to the remote system
3.       Change Remote Server to WES-DEVICE
e.      Build your project, from the menu select Build\Build Solution
f.        Start debugging, from the menu select Debug\Start Debugging
g.       At this point, Visual Studio will tell you that it is unable to start the application. To fix this:
                                                               i.      Open C:\SRC\RemoteDebug\RemoteDebug\Debug\RemoteDebug.exe.intermediate.manifest. In VS2005, the manifest looks like this:
                                                             ii.      Look in the manifest file to see what the application needs to run, in this case for VS2005 it is Microsoft.VC80.DebugCRT
                                                            iii.      Search in the Visual Studio installation folder for files and folders named Microsoft.VC80.DebugCRT
                                                           iv.      Copy the files to the Z: drive
h.      Start debugging again. This time the application should start and stop at your breakpoint
Copyright © 2009 – Bruce Eitman
All Rights Reserved