Remote Debugging with Reflector Pro – It could have been so easy!

.. but it isn’t 🙁

Visual Studio’s remote debugger is a really neat bit of kit that lets people with a lot of patience and no firewalls debug processes on a test machine using a visual studio instance on a completely separate development machine.

Obviously it would be great if you could combine this ability with Reflector Pro to decompile and debug any .NET assembly running on any machine. It is possible, but it’s not automatic, much to my annoyance.

The problem is that the .NET remote debugging system loads its .pdb files from the test machine, rather than from the machine running VS. (I found this with the help of John Robbins’ blog post).

Reflector Pro generates .pdb files on your development machine. VS knows where to find them, but it chooses to ignore them (in fact, worse, you can watch it looking on the test machine for them in paths that only exist on the dev machine).

The workaround is to copy the .pdb files from Reflector Pro’s debug store (which are located in your user’s local application data in Red Gate.NET Reflector 6Cache) and put them on the test machine, next to the running assemblies. The remote debugger will find them and everything will spring to life, showing you the decompiled code on the dev machine (which you don’t have to copy anywhere).

Hope that helps some people!