Remote Debugging (VC++.NET)

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
SSX-Thunderbird
DBB Admiral
DBB Admiral
Posts: 1275
Joined: Sun Jun 03, 2001 2:01 am
Location: Washington (the state, not the city)

Remote Debugging (VC++.NET)

Post by SSX-Thunderbird »

I've been attempting to attach a debugger remotely to FS2_Open (a community revision project for FS2), but when I look at the Debug Process option, I don't see an option to switch to another computer. The Help is referring to items that are not present as well.

Anyone know what the heck I need to do to get it to do this? I can't debug on the machine running FS2, because it doesn't like to give up the screen when a breakpoint hits.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

If the procedure is the same as VC++ 6, you start VC on the development computer, then start the debugger client (a separate program that comes with VC++ that just serves to channel debugger output over the network) on Computer #2. Then you start your program on Computer #2, then start a Remote Debugging Session on the dev computer. Breakpoints etc. will appear in the output window of the dev machine.
User avatar
SSX-Thunderbird
DBB Admiral
DBB Admiral
Posts: 1275
Joined: Sun Jun 03, 2001 2:01 am
Location: Washington (the state, not the city)

Post by SSX-Thunderbird »

Not seeing any of the information you wrote, unless it's hiding from me :P.
User avatar
MehYam
DBB Head Flapper
DBB Head Flapper
Posts: 2184
Joined: Thu Nov 05, 1998 12:01 pm
Location: Mountain View, CA, USA
Contact:

Post by MehYam »

1) copy the contents of the \Common7\Packages\Debugger directory to the target computer, so that you can run msvcmon from there

2) in your VC project settings, go to the Debugging section

3) under Remote Settings, choose one of the connection options. From experience, Remote via pipe is the easiest to get working (I forget why, but TCP/IP requires something extra that made it harder to get working). This option has to match whatever you set for msvcmon (msvcmon /? will spit out the help file)

4) set the Remote Machine, and set the Remote Command, which (I think) is the path of your executable from the target machine's point of view. I'm not sure if this step is still necessary, but it used to be that you'd either have to map a drive from the target machine to the one that you're debugging on, or use a UNC path (i.e. the target machine's msvcmon looks for \\my_comp\source\debug\fu.exe)
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Mehyam: won't pipes only work on NT-based OSes?
User avatar
SSX-Thunderbird
DBB Admiral
DBB Admiral
Posts: 1275
Joined: Sun Jun 03, 2001 2:01 am
Location: Washington (the state, not the city)

Post by SSX-Thunderbird »

Both systems are Windows 2000, so that's a non-issue for me. Visual Studio .NET is also installed on both, but I have to reinstall it on my laptop to proceed (it starts, and then shuts off a few seconds later).
User avatar
MehYam
DBB Head Flapper
DBB Head Flapper
Posts: 2184
Joined: Thu Nov 05, 1998 12:01 pm
Location: Mountain View, CA, USA
Contact:

Post by MehYam »

I'll amend something - I had to use the tcpip option for some remote debugging yesterday since I couldn't get pipes working from the VM (using VMWare - VMWare is the most useful piece of software ever written ever), and it was almost as easy to set up as it was in VC6. Just make sure you pass -anyuser to msvcmon on the command-line, map a drive to the debugging machine so that you can specify the full path of the executable relative to the target machine, and you're all set.
Post Reply