VS2010 remote debugging of C # programs

Source: Internet
Author: User

Scene:

The client's computer running program is abnormal, because the office space is not together, can not be directly on the customer's machine debugging. You now want to remotely debug the software on the client computer directly on the developer's machine (local machine).

Assume:
    • The system account for the local machine is GIS with a password of 111

    • Client machine's computer name is client

    • The program name to debug is Test.exe

Workaround:1. Customer machine configuration
  • Create a new system account that is consistent with the local machine

      • To ensure that the account and password are consistent

      • Add a GIS account in Control Panel, user account, and set a password of 111

      • Switch to the GIS account

  • Turn on remote services

      • Open Remote Desktop Service service, services, management tools, control Panel

  • set Local Security policy

      • Security options, local policies, local policy, Administrative Tools, control Panel--Network access: Sharing and security model for local accounts, setting to classic-Authenticate local users without changing their identity

  • shutting down the firewall

      • Windows Firewall, Control Panel, turn off the firewall with Windows Firewall on or off

  • local new Folder Bin, shared folder

      • Start Guest account, user account, Control Panel

      • Control Panel, Home group, change advanced sharing settings, password protected sharing, home or work, turn off password protected sharing

      • Right-click Add Guest user, user-specific, bin folder, and modify the share with permission level read/write

  • Open the Remote Debugger folder shared by the local machine and launch the msvsmon.exe under the appropriate platform

      • If you are prompted, "Windows Firewall on this computer is currently blocking remote debugging." Remote debugging requires that the debugger be allowed to receive information from the network ... , check the "Suppress restrictions on remote debugging from any computer".

2. Local machine configuration
  • Turn on remote services

      • Open Remote Desktop Service service, services, management tools, control Panel

  • set Local Security policy

      • Security options, local policies, local policy, Administrative Tools, control Panel--Network access: Sharing and security model for local accounts, setting to classic-Authenticate local users without changing their identity

  • Shared Remote Debugger folder

      • folder in "Common7\IDE" in the VS installation directory

      • Start Guest account, user account, Control Panel

      • Control Panel, Home group, change advanced sharing settings, password protected sharing, home or work, turn off password protected sharing

      • Right-click Add Guest user, user-specific, bin folder, and modify the share with permission level read/write

  • vs Set the properties of the project to be debugged for remote debugging

      • Set the shared folder name for the client machine, output path, project properties, build

        \\Client\bin\
      • startup, starting with project properties, debugging, and startup external programs set to

        \\Client\bin\test.exe
      • Working directory, startup options, debugging, Project properties, set to

        \\Client\bin\
      • Project properties, debugging, startup options, using remote computer, set to

        Client
  • start debugging and you're ready to start debugging.

      • Auto-start Test.exe on customer machine

      • The remote Debugging Monitor on the client machine displays "Connected"

Description
    • The solution of the client machine and the local machine are Win7 64-bit operating system, other systems can refer to processing.

    • This workaround is only tested in VS2010, and other versions can refer to processing.

    • Of course, the basic premise of this method is that the two machines can ping each other.


VS2010 remote debugging of C # programs

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.