views:

5997

answers:

7

Hi there, I hope someone can help me with my problem.

I want to use remote debugging. The Program, that I want to debug runs on machine b. Visual Studio runs on machine a. On machine b I have a folder with the following files

msvcr72.dll msvsmon.exe NatDbgDE.dll NatDbgDEUI.dll NatDbgEE.dll NatDbgEEUI.dll

If you think, there are files missing, could you also describe, where I find them usually? In the next step I start the msvsmon.exe and my program on machine b. On machine a I start Visual Studio 2008 and my solution in which the program was written. Then I choose Debug - Attach to Process. I take Remote Transport (Native Only with no authentication). I use the correct IP as qualifier and take the right process (program.exe). After a while the following message occurs in a popup-window

"Unhandled exception at 0x7c812a7b in program.exe: 0xE0434F4D: 0xe0434f4d"

I have the possibility to continue or break, when continuing the exception-message occurs again and again and again. So I pressed break and then the following message occurs

"No symbols are loaded for any call stack frame. The source code cannot be displayed.

I hope someone can help me. Thanks for any effort.

Greets

Sebastian

+3  A: 

Make sure you copy the .PDB file that is generated with your assembly into the same folder on the remote machine. This will allow the debugger to pickup the debug symbols.

Kyle Trauberman
+4  A: 

0xE0434F4D is an exception from the CLR (i.e., managed code). You need to do remote debugging with authentication and choose to debug managed code. Alternatively, it is possible to extract out the managed exception info using some debugger extensions but it is a bit more hard work.

References:

If broken it is...

1800 INFORMATION
+1  A: 

Remote debugging in .NET will not work if you don't place the .PDB files into the same directory where the debugged code exists.

If VS still can't find source for debugging, the debugged code and the VS project source are not the same version. The solution is rebuilding and redeploying the project.

artur02
A: 

this also did not work, the program now just exits with no message and the debugger does the same. No exception message, no possibility of break or continue.

Xelluloid
A: 

the versions are the same and the .pdb-files are in the directory of my program as I copied the whole directory to machine b.

Xelluloid
+1  A: 
  1. Add a shared folder on your dev machine that points to the location of the .pdb files
  2. Set up an environment variable called _NT_SYMBOL_PATH on the remote machine that points to the shared folder on your dev machine

The remote debugger will now search your dev machine for symbols. No need to copy them over for every build.

See MS Video here.

Start watching 8-9 minutes in. He demonstrates how to setup the remote debugger to load symbols from a drive share on your development machine.

Good luck!

BrianR
+1  A: 

1800 INFORMATION is right, you have to do remote debugging with Windows authentication in order to debug managed code, otherwise you won't be able to load the symbols for managed assemblies. Getting this to work with authentication is pretty tricky, as it requires local accounts on both machines with identical passwords, among other things. This question and everyone's answers are quite useful for getting that working.

http://stackoverflow.com/questions/396101/remote-debugging-in-visual-studio-vs2008-windows-forms-application

ajs410