Remote debugging in vs2012

Source: Internet
Author: User

I don't know if you have ever encountered such a situation. The newly developed program can run well on the local machine, but when the server is deployed to users too much, there are always inexplicable errors.

I can't see the problem again at half past one. What should I do? Can I only install vs on the server or client computer and follow up the code?

Actually, no. VS has a remote debugging function.

This function is like this. The program runs on another computer, but we can perform breakpoint tracking on the local computer.

The following uses vs2012 as an example to describe howRemote debugging without authentication(If you want to use authentication without a domain environment, see the final summary.) also, let's talk about how vs2012 and earlier versions have improved the remote debugging function.

1. Open the "remote debugger" folder from the Start Menu. After opening the folder, you will see two folders to be copied to the remote computer, you only need to select one copy from two according to the specific environment.

 

 

2. After copying the file, open the vs (msmsvsmon.exe ") on the remote computer. In the displayed window, click the Options menu and select" no authentication "and allow any user to debug the file.

Click "OK" to set the remote computer. Of course, don't forget to start the program you want to debug on the remote computer.

 

 

3. on our computer, open the project, open the append to process window from the Debug menu, select remote, enter the IP address of the remote computer, and press Enter;

Select the program to be debugged and click the Add button. Now, click a breakpoint.

 

 

4. vs2012 is different from previous versions.

Look at this figure, isn't it very familiar? It's not just the setting window on a remote computer. Well, let's take a closer look. This figure is different from the previous one. You can see the words "only for local hosts.

This figure is taken from the remote debugging Monitor of vs2010. What does this mean only for the local device? After several experiments, I came to the conclusion that this "local" should mean "Local Code ",

It corresponds to "managed code. If you use a version earlier than vs2012 and set it according to the methods described in the first three sections, there is no way to "break points" because the code we want to debug is "managed code ".

So how should I set it now? We can only select the "Windows Authentication" ticket. You can only select "default" as the remote connection ".

 To sum up, if you useVs2012Notes for remote debugging in earlier versions:

A,You cannot select no authentication

B. If it is not a domain environment, the remote computer and the Local Computer must useSame account password

C. The program files on the remote computer must beInclude". PDB"File

 

 

 

 

========================================================== ====
My open-source projects are usually accumulated, which is very helpful for improving development efficiency.
Http://lmcommon.codeplex.com/

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.