Global Office Directory
More Products
Share this page
Home > Community > Technical Blogs > Getting to Know Sitecore > Visual Studio Remote Debugging
Do you run Sitecore remotely but want to debug your code locally? Visual Studio supports remote debugging. There are a number of websites that describe how to configure remote debugging, but some things bear repeating.
I am writing this post with a specific scenario in mind: Sitecore is running in a virtual machine and Visual Studio is running on my local machine. I want to be able to develop my code locally, deploy to the virtual machine, and debug my code locally.
My local machine is running Windows 7. I log into an Active Directory domain. My virtual machine is running Windows Server 2008 R2 on VMware Workstation 7.1.
The first step is to configure the remote debugger service on the virtual machine (which, in this setup, is also called the remote machine). This service must run using a local account with the same user name and password as the account I log into my local machine with (meaning the account that is running Visual Studio).
The next step is to configure the local machine. If you log into your local machine with a local user account, this step can be ignored. However, if you log into your local machine using a domain account, there is an additional step. In order for remote debugging to work, I need to create a local account with the same user name and password as my domain account. This account should also be a member of the local Administrators group.
Now I am able to use remote debugging. In Visual Studio, when I want to debug I use the menu option Debug > Attach to Process.
In the Attach to Process screen, I enter the name of my remote server in the Qualifier box and press the Enter key. Visual Studio shows a list of processes I can debug. Sitecore runs in the w3wp process, so I select that process and click the Attach button.
Here are a couple of other notes that should help you get started:
Tags: API
- Sean Kearney August 22, 2011 at 12:29 PM
Adam is a technical architect on Sitecore's Product Marketing Team. He is responsible for spreading technical knowledge inside and outside of the company, with an emphasis on external systems and applications.
This website is designed to be fully functional with scripts disabled in browser. Please contact the webmaster for any suggestions