Several Trace debugging methods used in VC and their differences

Source: Internet
Author: User

Several types of debugging VC have been used in the recent section.Program. The general program will certainly use these methods.

The following is a summary:

1. Use trace to print the trace to the debugging window in the debug version of VC.

The limitation is that debugging cannot be performed without the VC environment. Only program writer for debugging.

2. Use the Microsoft Tracing Tool dbgview.exe to view the trace output, which can be separated from the VC environment.

The difference between this method and the first method is that the program can use trace to print messages independently from the VC environment. The user can be program tester to capture the logs of program errors for programmers to analyze the causes.

To some extent, this expands the scope of use of trace.

3. Embed code in the Code and output the trace to the file.

This is the most troublesome. You need to add Code specifically recording the running status of your program, and finally record these logs to the file code. In fact, this is not troublesome. I posted an article on this topic, . Implements a simple class to output trace to a file. It is easy to use and has little code.

This can be done by the customer for product testing. You cannot ask the customer to open dbgview to capture the log, but you can ask the customer to send the log file on the computer to you. Therefore, you can use this method to save the problems that occur during the program running. The customer's environment, operations, and other reasons may affect the program. Therefore, it is best to look at this log file to analyze the problem.

The first two benefits are that you do not need to change the code for debugging. Just use trace.

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.