Search code examples
c#.netvisual-studio-2008debuggingremote-debugging

Remote Debugging in Visual Studio (VS2008), Windows Forms Application


I'm trying to Remote Debugging a Windows Forms Application (C#), but i'm always getting this error:

Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'XXX. The Visual Studio Remote Debugger on the target computer cannot connect back to this computer. Authentication failed. Please see Help for assistance.

I tried to config according to the MSDN guides but i was not able to make it work.

My setup:

  • Development Computer - XP (x86) that is connected to a domain.
  • Test Computer - Vista (x86) that is NOT connected to a domain.
  • I have network connection between the machines.
  • I created a local user in the Test computer (user1) with the name of my domain user that I run the Visual Studio (mydomain\user1). setup the same password.
  • On The Test Computer i'm running "msvsmon.exe" as application (not as services), i'm running it using "runas" command with the user that i have created. (user1):

    runas /u:user1 msvsmon.exe

Can Someone help me please?

Thanks.


Solution

  • This is how it worked for me:

    Remote computer: Microsoft Virtual PC, "IHS\RDM" attached to my corporate domain, logged in as jdoe, administrator account.

    Local computer: Attached to local domain, logged in as jdoe, administrator account.

    1) remote computer: install rdbgsetup.exe (from Visual Studio 2005\Disk 2\Remote Debugger\x86)

    2) Remote computer: RUNAS /user MYDOMAIN\jdoe /netonly msvsmon

    3) Remote computer: msvsmon->Tools->permissions add user "MYDOMAIN\jdoe" (I have to do this every time I re-start)

    4) local computer: run msvsmon.

    5) local computer, msvsmon->Tools->permissions, add object types: "computers", "IHS\RDM"

    6) local computer, vs2005->debug->attach to process. Transport: Default, Qualifier: jdoe@RDM

    7) Refresh, and voila; a process list!