You can debug a Visual Studio application that has been deployed on a different computer. To do so, you use the Visual Studio remote debugger.
For in-depth instructions on remote debugging, see these topics.
|Azure App Service||Snapshot Debugger or Remote debug ASP.NET on Azure|
|Azure VM||Remote debug ASP.NET on Azure|
|Azure Service Fabric||Debug an Azure Service Fabric application|
|ASP.NET||Remote debug ASP.NET Core or Remote Debug ASP.NET|
|C# or Visual Basic||Remote debug a C# or Visual Basic project|
|C++||Remote debug a C++ project|
|Universal Windows Apps (UWP)||Run UWP apps on a remote machine or Debug an installed app package|
If you just want to download and install the remote debugger and don't need any additional instructions for your scenario, follow the steps in this article.
Download and Install the remote tools
On the device or server machine that you want to debug (rather than the machine running Visual Studio), get the correct version of the remote tools.
Version Link Notes Visual Studio 2017 (latest version) Remote tools The latest version of the remote tools is compatible with all Visual Studio 2017 releases. Always download the version matching your device operating system (x86, x64, or ARM64). On Windows Server, see Unblock the file download for help to download the remote tools. Visual Studio 2015 Remote tools Remote tools for Visual Studio 2015 are available from My.VisualStudio.com. If prompted, join the free Visual Studio Dev Essentials program, or sign in with your Visual Studio subscription ID. On Windows Server, see Unblock the file download for help to download the remote tools. Visual Studio 2013 Remote tools Download page in Visual Studio 2013 documentation Visual Studio 2012 Remote tools Download page in Visual Studio 2012 documentation
On the download page, choose the version of the tools that matches your operating system (x86, x64, ARM, or ARM64) and download the remote tools.
We recommend that you install the most recent version of the remote tools for your release of Visual Studio. The latest version (for example, 15.8) is compatible with earlier releases (for example, 15.0); however, earlier versions are not compatible with later releases. In addition, you must install the remote tools that have the same architecture as the operating system on which you want to install it. In other words, if you want to debug a 32-bit application on a remote computer running a 64-bit operating system, you must install the 64-bit version of the remote tools on the remote computer.
For debugging on Windows 10 on ARM devices, choose the ARM64 download available with the latest version of the remote tools. For Windows RT devices, choose the ARM version, which is only available in the Visual Studio 2015 RTW download.
When you have finished downloading the executable, go to the next section and follow setup instructions.
If you try to copy the remote debugger (msvsmon.exe) to the remote computer and run it, be aware that the Remote Debugger Configuration Wizard (rdbgwiz.exe) is installed only when you download the tools. You may need to use the wizard for configuration later, especially if you want the remote debugger to run as a service. For more information, see (Optional) Configure the remote debugger as a service.
Supported Operating Systems
The remote computer must be running one of the following operating systems:
Windows 10 (not phone)
Windows 8 or 8.1 (not phone)
Windows 7 Service Pack 1
Windows Server 2012 or Windows Server 2012 R2
Windows Server 2008 Service Pack 2, Windows Server 2008 R2 Service Pack 1
Windows Phone requires a USB connection to debug (it does not require the remote tools).
Supported Hardware Configurations
1.6 GHz or faster processor
1 GB of RAM (1.5 GB if running on a virtual machine)
1 GB of available hard disk space
5400-RPM hard drive
DirectX 9-capable video card running at 1024 x 768 or higher display resolution
The remote computer and the Visual Studio computer must be connected over a network, workgroup, or homegroup, or else connected directly through an Ethernet cable. Debugging between two computers connected through a proxy is not supported. Debugging over a high latency or low bandwidth connection, such as dialup Internet, or over the Internet across countries is not recommended and may fail or be unacceptably slow.
(Optional) To run the remote debugger from a file share
You can find the remote debugger (msvsmon.exe) on a computer with Visual Studio Community, Professional, or Enterprise already installed. For some scenarios, the easiest way to set up remote debugging is to run the remote debugger (msvsmon.exe) from a file share. For usage limitations, see the remote debugger's Help page (Help > Usage in the remote debugger).
Find msvsmon.exe in the directory matching your version of Visual Studio. For Visual Studio Enterprise 2017:
Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Remote Debugger\x86\msvsmon.exe
Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Remote Debugger\x64\msvsmon.exe
Share the Remote Debugger folder on the Visual Studio computer.
On the remote computer, run msvsmon.exe from the shared folder. Follow the setup instructions.
For command line installation and command line reference, see the Help page for msvsmon.exe by typing
msvsmon.exe /? in the command line on the computer with Visual Studio installed (or go to Help > Usage in the remote debugger).
Set up the remote debugger
You must have administrative permissions on the remote computer.
Locate the Remote Debugger application. (Find msvsmon.exe in the location where it has been installed, or open the Start menu and search for Remote Debugger.)
If you are running the remote debugger on a remote server, you can right-click the Remote Debugger app and choose Run as administrator. If you are not running it on a remote server, just start it normally.
When you start the remote tools for the first time (or before you have configured it), the Remote Debugging Configuration dialog box appears.
If the Windows Service API is not installed (which happens only on Windows Server 2008 R2), choose the Install button.
Select the network types you want use the remote tools on. At least one network type must be selected. If the computers are connected through a domain, you must choose the first item. If the computers are connected through a workgroup or homegroup, you need to choose the second or third item as appropriate.
Choose Configure remote debugging to configure the firewall and start the tool.
When configuration is complete, the Remote Debugger window appears.
The remote debugger is now waiting for a connection. Make a note of the server name and port number that is displayed, because this must match the configuration you later use in Visual Studio.
When you are finished debugging and need to stop the remote debugger, click File > Exit on the window. You can restart it from the Start menu or from the command line:
<Remote debugger installation directory>\<x86, x64, ARM, ARM64, or Appx>\msvsmon.exe.
Configure the remote debugger
You can change some aspects of the configuration of the remote debugger after you have started it for the first time.
If you need to add permissions for other users to connect to the remote debugger, choose Tools > Permissions. You must have administrator privileges to grant or deny permissions.
You can run the remote debugger under a user account that differs from the user account you are using on the Visual Studio computer, but you must add the different user account to the remote debugger's permissions.
Alternatively, you can start the remote debugger from the command line with the /allow <username> parameter: msvsmon /allow <username@computer>.
If you need to change the Authentication mode or the port number, or specify a timeout value for the remote tools: choose Tools > Options.
For a listing of the port numbers used by default, see Remote Debugger Port Assignments.
You can choose to run the remote tools in No Authentication mode, but this mode is strongly discouraged. There is no network security when you run in this mode. Choose the No Authentication mode only if you are sure that the network is not at risk from malicious or hostile traffic.
(Optional) Configure the remote debugger as a service
For debugging in ASP.NET and other server environments, you must either run the remote debugger as an Administrator or, if you want it always running, run the remote debugger as a service.
If you want to configure the remote debugger as a service, follow these steps.
Find the Remote Debugger Configuration Wizard (rdbgwiz.exe). (This is a separate application from the Remote Debugger.) It is available only when you install the remote tools. It is not installed with Visual Studio.
Start running the configuration wizard. When the first page comes up, click Next.
Check the Run the Visual Studio 2015 Remote Debugger as a service checkbox.
Add the name of the user account and password.
You may need to add the Log on as a service user right to this account (Find Local Security Policy (secpol.msc) in the Start page or window (or type secpol at a command prompt). When the window appears, double-click User Rights Assignment, then find Log on as a service in the right pane. Double-click it. Add the user account to the Properties window and click OK). Click Next.
Select the type of network that you want the remote tools to communicate with. At least one network type must be selected. If the computers are connected through a domain, you should choose the first item. If the computers are connected through a workgroup or homegroup, you should choose the second or third items. Click Next.
If the service can be started, you will see You have successfully completed the Visual Studio Remote Debugger Configuration Wizard. If the service cannot be started, you will see Failed to complete the Visual Studio Remote Debugger Configuration Wizard. The page also gives some tips to follow to get the service to start.
At this point the remote debugger is running as a service. You can verify this by going to Control Panel > Services and looking for Visual Studio 2015 Remote Debugger.
You can stop and start the remote debugger service from Control Panel > Services.
Set Up Debugging with Remote Symbols
You should be able to debug your code with the symbols you generate on the Visual Studio computer. The performance of the remote debugger is much better when you use local symbols. If you must use remote symbols, you need to tell the remote debugging monitor to look for symbols on the remote machine.
Starting in Visual Studio 2013 Update 2, you can use the following msvsmon command-line switch to use remote symbols for managed code:
For more information, please see the remote debugging help (press F1 in the remote debugger window, or click Help > Usage). You can find more information at .NET Remote Symbol Loading Changes in Visual Studio 2012 and 2013