- article
Applies to: visual study
Visual Studio for Mac
visual study code
To debug a Visual Studio application on another computer, install and run the remote tools on the computer where you want to deploy the application, configure your project to connect to the remote computer from Visual Studio, and then deploy and run the application.
For information about remote debugging of Universal Windows Apps (UWP), seeTroubleshoot installed application packages.
Demand
Remote debugging is supported on Windows 7 and later versions and Windows Server versions starting with Windows Server 2008 Service Pack 2. For a complete list of requirements, seeDemand.
noting
Debugging between two computers connected via a proxy is not supported. Debugging over high-latency or low-bandwidth connections (such as Internet dial-up) or cross-country Internet is not recommended and may fail or be unacceptably slow.
On the remote device or server that you want to debug (not on the Visual Studio computer), download and install the correct version of the remote tools from the link in the table below.
- Download the latest remote tools for your version of Visual Studio. The latest version of Remote Tools is compatible with older versions of Visual Studio, but earlier versions of Remote Tools are not compatible with newer versions of Visual Studio. (For example, if you are using Visual Studio 2019, download the latest update for Remote Tools for Visual Studio 2019. In this case, do not download Remote Tools for Visual Studio 2022.)
- Download a remote tool that has the same architecture as the computer you want to install on. For example, if you want to debug a 32-bit program on a remote computer with a 64-bit operating system, you must install 64-bit remote tools.
- To remotely debug an ARM64EC application on an ARM64 device, install the ARM64 remote tools and start the x64 remote debugger that was installed with those tools. This can be found at:Programfiler (x86)\Microsoft Visual Studio
\Common7\IDE\Remote Debugger\x64 .
Version | fellow | noting |
---|---|---|
Visual Studio 2022 | remote tool | Compatible with all versions of Visual Studio 2022. Download the version that matches your device's operating system (x86, x64 or ARM64). On Windows servers, seeUnblock file downloadsGet help downloading remote tools. |
Visual Studio 2019 | remote tool | Compatible with all versions of Visual Studio 2019. Download the version that matches your device's operating system (x86, x64 or ARM64). On Windows servers, seeUnblock file downloadsGet help downloading remote tools. |
Visual Studio 2017 | remote tool | Compatible with all versions of Visual Studio 2017. Download the version that matches your device's operating system (x86, x64 or ARM64). On Windows servers, seeUnblock file downloadsGet help downloading remote tools. |
Visual Studio 2015 | remote tool | Remote Tools for Visual Studio 2015 are available from My.VisualStudio.com. Sign up for free if promptedVisual Studio development essentialsprogram or sign in with your Visual Studio subscription ID. On Windows servers, seeUnblock file downloadsGet help downloading remote tools. |
Visual Studio 2013 | remote tool | The download page in the Visual Studio 2013 documentation |
Visual Studio 2012 | remote tool | The download page in the Visual Studio 2012 documentation |
Version | fellow | noting |
---|---|---|
Visual Studio 2019 | remote tool | Compatible with all versions of Visual Studio 2019. Download the version that matches your device's operating system (x86, x64 or ARM64). On Windows servers, seeUnblock file downloadsGet help downloading remote tools. For the latest version of Remote Tools, openVisual Studio 2022 Documentation. |
Visual Studio 2017 | remote tool | Compatible with all versions of Visual Studio 2017. Download the version that matches your device's operating system (x86, x64 or ARM64). On Windows servers, seeUnblock file downloadsGet help downloading remote tools. |
Visual Studio 2015 | remote tool | Remote Tools for Visual Studio 2015 are available from My.VisualStudio.com. Sign up for free if promptedVisual Studio development essentialsprogram or sign in with your Visual Studio subscription ID. On Windows servers, seeUnblock file downloadsGet help downloading remote tools. |
Visual Studio 2013 | remote tool | The download page in the Visual Studio 2013 documentation |
Visual Studio 2012 | remote tool | The download page in the Visual Studio 2012 documentation |
You can run the remote debugger by copyingmsvsmon.exeon the remote computer instead of installing remote tools. However, the Remote Debugging Configuration Wizard (rdbgwiz.exe) are only available if you have remote tools installed. If you want to run the remote debugger as a service, you may need to use the wizard to set it up. For more information, see(Optional) Configure the remote debugger as a service.
noting
- To debug Windows 10 or newer apps on ARM devices, use ARM64, which works with the latest version of Remote Tools.
- To debug Windows 10 apps on Windows RT devices, you must use ARM, which is only available in the Visual Studio 2015 Remote Tools download.
trace
In some cases, it may be more efficient to run the remote debugger from a shared file. For more information, seeRun the remote debugger from a shared file.
Configure an external debugger
Find and start on the remote computerremote debuggerfromPrinciplemenu.
If you do not have administrator rights on the remote computer, right-clickremote debuggerapplication and selectrun as administrator. Otherwise, it can start normally.
If you plan to attach a process that is running as an administrator or under another user account (such as IIS), right-clickremote debuggerapplication and selectrun as administrator. For more information, seeRun the remote debugger as an administrator.
When you start the remote debugger for the first time (or before you set it up),Configure remote debuggingThe wizard appears.
In most scenarios, you have to chooseNextuntil you arriveConfigurer Windows Firewallguide page.
If the Windows Web Services API is not installed (this only happens on Windows Server 2008 R2), selectSetting upbutton.
Select at least one type of network you want to use the remote tool on. If the computers are connected through a domain, the first point must be selected. If the computers are connected through a workgroup or a homegroup, select the second or third point, as appropriate.
Then chooseExitStart the remote debugger.
Then chooseConfigure remote debuggingStart the remote debugger.
When the configuration is complete,remote debuggerThe window appears.
The remote debugger is now waiting for a connection. Configure the remote connection in Visual Studio using the server name and port number shown.
To stop remote debugging, selectdocument>Exit. You can restart it fromPrinciplemenu or from the command line:
\msvsmon.exe
noting
If you need to add permissions for other users, change the authentication mode or port number of the remote debugger, seeConfigure the remote debugger.
Remote debugging of C++ projects
In the following procedure, the path to the project is C:\remotetemp and the name of the remote computer ismy surface.
Create a C++ console application calledCppConsoleApp
Set a breakpoint somewhere in your application that is easy to reach, e.g.CppConsoleApp.cpp, ind
the most important
Work.In Solution Explorer, right-click the project and selectcharacteristic. Openerror correctionTicket.
Regulationthe debugger to startreachRemove the Windows Debugger.
Make the following changes to the properties:
environment value remote control C:\remotetemp\CppConsoleApp.exe Task list C:\Remove temporary files remote server name my surface:The port number connect-connect Remote control using Windows authentication debugging type local only implementeringsmappe C:\Remove temporary files Additional files to develop $(project folder)\data If you are deploying to a different folder and want to deploy all files in the folder to the same folder, specify the folder name.
For more information about the properties, seeProject settings for C++ debug configurations.
In Solution Explorer, right-click the solution and selectconfiguration manager.
toerror correctionconfiguration, selectionentercontrol box.
start debugging (Debug > Start Debugging, theF5).
Executable files are automatically deployed on remote computers.
If prompted, enter your network information to connect to the remote computer.
The required credentials are specific to your network security configuration. On a domain computer, you can e.g. select a security certificate or enter a domain name and password. On a computer without a domain, you can enter the computer name and a valid user account name, such asMySurface\name@noget.comand the correct password.
On the Visual Studio desktop, you should see execution stop at the breakpoint.
trace
Alternatively, you can deploy these files as separate steps. insidesolution exploration,Right click on the project node and selectenter.
If you have non-code files required by your application, you can list them in a semicolon-separated list in the following locations:Additional files to developexistsRemove the Windows DebuggerSide.
Alternatively, you can include these files in your project and then setcontentsproperty inAndindecharacteristicpages for each file. These files are copiedimplementeringsmappeis specified inRemove the Windows DebuggerPage. You can also changeObject typereachcopy filesIf you need to copy the file to a subfolder of this file, you must specify additional propertiesimplementeringsmappe.
Configure debugging with remote symbols
You should be able to debug your code using the symbols generated in your Visual Studio desktop. The remote debugger works much better when you use local symbols.
If you need to use remote symbols, specify the remote symbols in Visual Studio by adding the Windows shared file to the symbol search pathTools > Options > Debug > Symbols.
See also
- Debugging in Visual Studio
- First look at the debugger
- Configure Windows Firewall for remote debugging
- Assign an external debug port
- Remotely debug ASP.NET on a remote IIS computer
- Remote troubleshooting and troubleshooting