H(hh.hh.hh.hh) <---- Remote Debug ---> R(rr.rr.rr.rr)
The following configuration needs to be done to enable debugging the app remotely.
It is assumed that VC++ .NET 2003 has been installed on both machines.
=== Remote(R) machine configuration ===
Login as administrator.
Goto Start--> Administrative Tools --> Computer Management. A window pops up.
Goto ComputerManagement(Local)-->System Tools-->Local users and groups-->Users
Right click and click the "New User" button. Enter username as the same one that is being used on the H machine. i.e lets says user jdoe on machine H is using his/her VC++ 2003 IDE to debug the app on R then we have to create a jdoe user on R. The password needn't be the same though. Enter the user name and password in the boxes. Uncheck "User must change password at next logon" box and check "password never expires". Hit the Create button. The user jdoe will have been created.
Goto ComputerManagement(Local)-->System Tools-->Local users and groups-->Groups
Click on Administrators. Then click Add. In the "Enter the object names to select" type in jdoe or whatever username we have created above. Then click the ok button. Do the same for the "Remote Desktop users" and "Debugger users" groups.
Run the Visual C++ Remote Debugger as follows.
"C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\Debugger\msvcmon.exe" -tcpip
A shortcut can be created for the above command on the desktop for convenience.
=== Host(H) machine configuration ===
Create a shared folder on H as follows
subst F: \\rr.rr.rr.rr\C$
In the IDE goto Project-->Properties. Set the values as follows
Menu | Field | Value |
Configuration properties--> General | OutputDirectory | F:\appdir |
Configuration properties--> Linker-->General | OutputFile | F:\app\app.exe |
Configuration properties--> Linker-->Debugging | Generate Program database file | F:\app\app.pdb |
Configuration properties--> Debugging | Command Arguments | -debug |
Configuration properties--> Debugging | Debugger Type | Native Only |
Configuration properties--> Debugging | Connection | Remote via TCP/IP (Native only) |
Configuration properties--> Debugging | Remote Machine | rr.rr.rr.rr |
Configuration properties--> Debugging | Remote command | c:\app\app.exe |
After the remote debugger app is run on R start the IDE on H and Goto menu Debug-->Start. See that the app launches on the remote machine.