Skip to main content

How to setup remote debugging on a remote machine running within a VM?

This guide will show step-by-step instructions of setting up a remote machine for remote debugging using Visual Studio 2013


  • Visual Studio 2013 or later
  • Remote machine running Windows 7 within a VM player
Note: Since Visual Studio 2012, Microsoft only supports remote debugging for Windows 7 or newer. To remote debug Windows XP, you'll need to use an older version of Visual Studio and its respective remote debugging tools.

 Step-by-step guide:

  1. Download and copy the Remote Tools in your Win7 VM.
    • You must get the update version of the Remote Tools for Visual Studio 2013 that matches the update version of your Visual Studio installation.
  2. Install the Remote tools in your VM.
  3. After installation, run the Remote Debugger 
    1. Navigate to Tools->Options Menu
    2. Ensure that Windows Authentication is selected. Press OK.
  4. Open Visual Studio in your local machine.
    • Make sure you have setup the remote machine in the project you like to remote debug as shown in the following figure.

  •  You also need to update the Output Path of the build so that it matches the path in your     remote machine.

Important Notes:
  • You must have the same version of the code on the server as you have locally, so make sure you publish your solution before trying to debug it.
  • You must publish the Debug version of the code to the server. If you publish the Release version, the .pdb files which contain all of the debug symbols will not be included and you won’t be able to debug remotely.

5.  From Visual Studio in your local machine.
    1. Navigate to Debug->Attach to Process
    2. Ensure in Transport field "Default" is selected
    3. Type your remote machine IP or alias in the Qualifier field and click Refresh button.
    4. If prompt for authentication type user name and password for the remote machine
If the connection is successful it will list all the running process in remote VM machine

6. Select the process you like to attach for remote debugging and click Attach.

Congratulations now you can remote debug to the attached process!

Things to check In case attaching to process fails:

  • If process attaching fails with VS 2013 showing the message "Unable to attach to process. The RPC server is not available".
  • Ensure that "Use Manage Compatibility Mode" option from Debug -> Options and Settings ->General Tab is unchecked.
  • Ensure Firewall is not blocking VS to attach to the remote process. Add VS 2013 in the list of allowed firewall program.
  • Make sure that RPC service is running both in local and remote machine.


Popular posts from this blog

Creating dynamic email templates using C# and Office Outlook

It is quite common for many applications to send automated email notifications. Couple of months ago, I have worked on improving our old email template format to make it more user friendly . In this tutorial I will walk you though regarding how I took advantage of Microsoft Outlook to quickly generate custom email template and later using the html template for building an automated custom email application using C#. Steps: Creating Templates: Using the rich text editor support  in Outlook create a nicely formatted email. Use placeholder text for the values you like to change dynamically based on your task completion status. To keep this tutorial simple, I have created a  simple table with placeholder text inside the third bracket  [place holder text]. However, you can use anything supported by outlook editor. Figure: Email Template Getting HTML code: Send the created email to your own address. After that, open the sent email and right click to view source . It

Why using XOR might not be a good hash code implementation?

Using XOR for computing hash codes works great for most of the cases specially when order of computation does not matter. It also has the following benefits: XOR has the best bit shuffling properties of all bit-operations and provides better distributions of hash values. It is a quick single cycle operation in most computer  Order of computation does not matter. i.e. a^b = b^a However, if ordering of elements matter then it is often not a good choice. Example For simplicity consider you have a class with two string properties named Prop1 and Prop2  and your GetHashCode returns the xor of their hash code. It will work fine for most of the cases except cases where same values are assigned to different properties. It will generate same hash-code i.e. collision in that case as can be seen in the below example . However, using the modified approach as recommenced by Joshua Bloch's in Effective Java which uses prime multiplication and hash chaining provides more unif

Persian Music - Homayoon - Nemitonam English lyrics

I love this song. I have requested one of my Persian friend to translate it for me and she did really nice job.. I am sure you will love it.. " "The person who was the only person I had, was the only refuge of my lonely heart, Left me alone and went from my side I am restless form the pain of her separation … I thought she stays with me sings love song for me I thought she understand my words I didn’t know she’s unkind … Though gone, but still I am full of her love Her thought is always with me Wherever I go, she is in front of my eyes, in front of my eyes I want to stand out find a way to reduce my pain of her separation But it is not possible, There is no way I cannot bear I cannot bear The person who was the only person I had, was the only refuge of my lonely heart, Left me alone and went from my side I am restless form the pain of her separation … I thought she stays with me sings love song for me I thought she understand my words I didn’t know she’s u