1. Locate the corresponding debug version in the Microsoft Visual studio/visual Studio tools/remote Debugger folder directory to the remote server.
2.
Depending on the server, select the corresponding version
3.
Copy the tool to the remote server
4.
Running msvsmon.exe on a remote server
-  
The default debugging options use Windows authentication, This means that when a machine is connected remotely to the 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 validated to allow debugging.
5, If you do not want to authenticate the user name password, you must set the authentication mode to "No authentication."
6,
Running Visual Studio with an administrator account, opening debug/Attach to process
7,
when the remote server is using Windows authentication
Select Transport as default, enter the IP of the remote server in qualifier: port number, enter.
This will jump out of the login box and fill in the server's authorized user name and password.
8,
Select the process where the ASP is located and click "Attach". If no process is found, check show all user processes.
- 4
when the remote server uses "no Authentication"  
Select transport as 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.
- 5
After attaching to a remote process, it can be set as local code