Visual Studio Remote Debugging

Source: Internet
Author: User

Remote debugging is an important feature in Visual Studio that allows us to debug on the target machine. Because of different computers, the operating environment is not the same, so the compiled program may not be able to run on the target machine, but there is no source code on the target, so we can use remote debugging at this time. such as debugging a setup program in a virtual machine.

1. Copy the remote debugging tool to the target machine.

Remote debugging requires the use of remote debugging tools from the Visual Stuido Debugger. The tool is in the installation directory of visual Stuido, such as my installation directory in D-disk, D:\Program Files (x86) \microsoft Visual Studio 12.0\common7\ide\remote Debugger\ X86, select the specific machine type and test the folder on the target machine.

2. Run the Remote debugging tool

Open the copied directory file and run Msvmon.exe as administrator. Such as:



Select the "Tools" menu, "Options" in the drop-down menu, configured as follows:


After the configuration is complete, click "OK", at this time, you can run the program on the target machine, the program should have an error. The next step is to configure the environment for Visual Studio on the debug machine.

3. Use visual Stuido to attach the running process on the target machine.

Open visual Studio with the source code for the error program and attach the program on the target machine to the process as follows:


Select the mode of transmission for remote (no authentication), the qualifier entered the target machine (remote machine) IP address, after the refresh, if the connection is error-free, you can see the target machine running errors in the application process, select the process, at this time, the Visual The code in studio is attached to the remote process, at which point Visual Studio enters the debug state.

4. Debug remote error process mode.

when Visual Studio enters the debug state, it uses "break all" to locate an error in the target machine, or it can be interrupted by a popup modal dialog box.



5. Summary

Remote debugging can be useful in some cases to help us find the hidden issues associated with the environment configuration in our programs, making our programs more robust.
















Visual Studio Remote Debugging

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.