Sometimes, after you have tested and debugged your code extensively, you may find that the code is not working as expected. Quite often the problem is related to deployment issues, configuration of the production server and folder or account permissions.

Below is a quick step-by-step checklist on how to set up Visual Studio Remote Debugging Monitor on the production environment and how to connect Visual Studio to a Remote Debugging Monitor.

  1. From your development PC, go to Programs > Microsoft Visual Studio 2010 > Visual Studio Tools > Visual Studio 2010 Remote Debugger Folder.
  2. A Windows Explorer window will open and you will see the 32 and 64-bit versions of the Remote Debugging Monitor.
  3. Copy the respective version that matches your server (e.g. copy the x64 folder) to a folder on your production server.
  4. While at the console on your production server, go to the folder you have just copied from development and start msvsmon.exe.
  5. Go to Tools > Options and change the Authentication mode to No Authentication and check the box Allow any user to debug.
  6. From your development machine, on Visual Studio, go to Tools > Attach to Process.
  7. Change the Transport to Remote and the Qualifier to the name of your production server.
  8. You should now see the executable, which you want to debug on that list. Select the process you want to debug and click Attach.
  9. You may now debug the code while it is running on the remote server.
  10. Just remember to turn off Remote Debugging Monitor at the production server once you are done.