Remote Debugging ASP.

Source: Internet
Author: User

When a project is deployed to a production environment, some failures are unavoidable, and some can be reproduced directly in the local test environment, while others cannot be reproduced. For bugs that can be reproduced in a local test environment, developers are often able to troubleshoot problems quickly. And for a bug that can't be reproduced, it's not so easy.

Remote debugging is available in Visual Studio to help us with remote debugging.

Prepare the Environment

1. This machine installs Visual Studio (which is demonstrated here with Visual Studio 2012).

2. Your ASP. Source code, while ensuring that the remote server is used by the source of the compilation generated (Debug, release version is OK).

Debugging steps

1. Copy the corresponding debug version from the Microsoft Visual studio/visual Studio tools/remote Debugger folder directory to the remote server.

Locate the Remote Debugger Folder

Depending on the server, select the corresponding version

Copy the tool to the remote server

2. Run msvsmon.exeon the remote server.

The default debugging options use Windows authentication, which means that when a machine is connected remotely to a server, it needs to enter the user name and password that are used to log on to the remote server, and it cannot be connected unless it is authenticated to allow debugging.

Run msvsmon.exe on the server

When you start, the following dialog box is displayed

If you do not want to authenticate the user name password, you must set the authentication mode to "No Authentication".

Select "Tools"/"Options"

Select "No Authentication" and tick "allow any user to debug"

3. Under Run Visual Studio with an administrator account, open Debug/attach to process.

Click "Attach to Process"

3.1 Remote server with "Windows Authentication"

Select Transfer as default, and in qualifier enter the IP of the remote server: port number, enter.

This will jump out of the login box, fill in the server authorized user name and password.

Enter user name and password

Select the process where the ASP is located and click "Attach". If no process is found, check show all user processes.

Select the corresponding process to attach

The server side will see the word "XXX is connected"

3.2 Remote server with "No Authentication"

Select Transfer to remote (no authentication), enter the IP of the remote server in qualifier: port number, enter.

Select the process where the ASP is located and click "Attach". If no process is found, check show all user processes.

4. After attaching to a remote process, you can set breakpoints like local code to debug.

Remote Debugging ASP.

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.