locked
Visual Studio 2005 remote debugging on remote Server 2003 sp1 RRS feed

  • Question

  • Hello, I hope someone can help me with this error I'm getting while trying to debug the console app remotely on a server machine:

    Error while trying to run project unable to start program 'C:\Dev\ConsoleApp\bin\Debug\ConsoleApp.exe'.

    The device is not ready.

    Here's my setup:

    Local development machine: Windows XP x64, Visual Studio 2005 SP1, .NET 3.0
    Remote server: Server 2003 (SP1), .NET 3.0, Visual Studio Remote Debugging Monitor installed

    In the console app Properties -> Build Events page, I have it copy the entire output (bin\Debug) to a mapped directory on the server. The files copy and the project builds successfully.

    In the console app Properties -> Debug page, I put the server name into the "Use remote machine" field.

    Also, after F5 is hit, a few seconds go by, and then the debugging monitor shows it connected, and then immediately after that, the error box pops up on the local machine. So it seems like it connects fine, but it can't run the app remotely for some reason.

    Any ideas?

    Thank you!
    Wednesday, May 23, 2007 6:46 PM

Answers

  • Ok, I got it to debug remotely using the Visual Studio Remote Debugging Monitor, but I don't think I'm doing it the intended way. 

    It turns out the remote debugger needs the debug directory in the same exact path as on the local machine including the drive letter! My project drive is actually D: which didn't exist on the remote machine. So subst to the rescue! I ran this on the remote machine:

    subst D: C:\

    Then, after working out the build events commands to copy the files over to the correct Debug directory on the remote machine, remote debugging is working fine.

    Isn't there an option to set the remote directory? I don't see one.


    Wednesday, May 23, 2007 11:26 PM

All replies

  • Post is updated: the server is SP1 not SP2.

    Anyway, I put two lines of "Debugger.Break()" in the code and was able to successfully attach to the process and debug it that way. It's a lot more cumbersome though. Hopefully there's still a way to do it remotely...

    Wednesday, May 23, 2007 7:20 PM
  • Ok, I got it to debug remotely using the Visual Studio Remote Debugging Monitor, but I don't think I'm doing it the intended way. 

    It turns out the remote debugger needs the debug directory in the same exact path as on the local machine including the drive letter! My project drive is actually D: which didn't exist on the remote machine. So subst to the rescue! I ran this on the remote machine:

    subst D: C:\

    Then, after working out the build events commands to copy the files over to the correct Debug directory on the remote machine, remote debugging is working fine.

    Isn't there an option to set the remote directory? I don't see one.


    Wednesday, May 23, 2007 11:26 PM
  • Sorry, the C# and VB project systems don't include support for that idiom.  You can use the "exe only" project system (File->open->Project and select your debug exe), to have more control over your debugging properties (including remote directories).

     

    John

    Friday, June 8, 2007 11:20 PM