HOW TO: Setup Visual Studio Remote Debugging

If you use virtual machines to host MSCRM and find yourself having to develop plugins or workflow assemblies inside your virtual machine then this is for you! Tired of speed issues huh? I don’t blame you! Its not nice when the Visual Studio inside your image can’t keep up with the speed of your actions. Anyway, why are you coding inside your image!? Oh… to debug? Well install the remote debugger on to the virtual machine, develop on your local machine, deploy your assemblies to the virtual machine, and to debug attach to the process you require which is exposed by the remote debugger.

Follow the steps below for setting up the remote debugger and attaching to your required process.

  • First download the lastest version of the remote debugger on to the virtual machine. At the time of writting this the latest version can be found here.
  • After downloading the correct version run the installation.

Remote Debugger Start

  • Accept the license and Install

  • Complete the installation

Remote Debugger Install

  • After completing the installation the configuration wizard will start.

Remote Debugger Configuration Wizard

  • As this is my virtual machine I prefer to configure the remote debugger as a service. If you we pointing at something like a customers system then your best to run this as an application instead.
  • Enter the authentication details. This account needs to have permissions to Log on as a service.

Remote Debugger Authentication

  • Now select the access range. As I’m hosting my image I want to only allow computers on my network to connect.

Remote Debugger Access

  • You will now see a summary page that you can ok.
  • if your service doesn’t start, click start and type services.msc
  • Locate the visual studio 2010 remote debugger service.
  • Properties it and for logon enter the account credentials you want to use.
  • The account will be given Log on as a Service permissions.

Remote Debugger Log On Service

  •  Now under the start bar locate and start the remote debugger monitor.
  • From the tools tab select options and note down the server name.

Remote Debugger Monitor

Now the remote debugger is set up on the server. Now lets say you have been working on a plugin and have deployed it to the server but want to test it.

  • Switch to your local machine and open up yourVvisual Studio solution.
  • From the debug tab select Attach to Process.
  • Under Qualifier enter the Server Name that you noted down and hit enter.
  • You will now see all the services on that machine, providing your are on the same subnet (We configured this eailer).
  • Select w3wp, place some breakpoints into your code and trigger your plugin from CRM.
  • Happy Debugging!


Leave a Reply

Your email address will not be published. Required fields are marked *