Loading debug symbols when remote debugging: native vs managed

I have noticed that a lot of people are confused when it comes to symbol loading while debugging an application on a remote machine. Basically there are three cases:

1. Debugging native code

Let's say you are attaching to a native app running on Machine A from a VS.NET debugger running on Machine B. In this case, if you want to automatically load symbols for this application (or for a dll loaded by it) the symbols (i.e. the corresponding .pdb file) needs to exist on the debugger machine (i.e. Machine  B).

A common scenario here is when you have a symbol cache specified. This needs to be on the debugger machine.

2. Debugging managed code

Now let's say you are attaching to a managed app running on Machine A from a VS.NET debugger running on Machine B. In this case, if you want to automatically load symbols for this application (or for a dll loaded by it) the symbols (i.e. the corresponding .pdb file) needs to exist on the machine where the app is running (i.e. Machine  A). In otheer words, if you want to automatically load symbols from a symbol server, the sym server neds to be set up on Machine A and the cache directory needs to be on Machine A.

3. Debugging mixed mode (interop)

If you want to debug an app running on Machine A in mixed mode (native + managed) then, the symbol files for the native modules need to be on the debugger machine (Machine B) and the symbols for the managed modules need to be on Machine A.