Visual c development tools and debugging skills

Source: Internet
Author: User

Original article:Http://gamedev.csdn.net/page/f530fc44-61e2-414e-ba45-fd869442855d

1. How to debug in the release status
Project-> setting => projectsetting dialog box, select the release status. In the C/C ++ label, select general for category, disable (Debug) for optimizations, and program database for debut info. Select the Generate debug info check box in the Link label.

Note: It is only an intermediate state between debug and release, and all assert and verify do not work. The function call method is actually called, rather than the table, however, in this status, the quickwatch and call queue tracking functions are still effective, just like the debug version.

2. What is the difference between release and debug?
The release version is called the release version, and the debug version is called the debug version.
Debug can be executed and tracked in one step, but the generated executable file is relatively large, and the code runs slowly. Release runs fast and has a small executable file, but cannot execute the debugging function under the compiling conditions.
The release EXE file is linked to the Standard mfc dll (use MFC in a shared or static DLL ). These DLL have been configured during Windows installation, so these programs can run on machines without visual C ++ 6.0 installed. The debug version EXE is linked to the debug version of the mfc dll file and cannot be run on a machine without visual C ++ 6.0 installed, because the corresponding DLL is missing, unless you select use static DLL when link.

3. What is the difference between assert and verify?
The content in assert is not compiled in the release version. Verify still translates the content, but does not judge whether the content is true or false. Therefore, the latter is safer.
For example, assert (file. Open (strfilename )).
Once in the release version, this line is ignored, and the file is not open () at all, and there is no error message. If verify () is used, this problem will not occur.

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.