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