VC debug program output first-chance exception.

Source: Internet
Author: User
Tags microsoft c

Debug in VCProgram"First-chance exception in xxx.exe..." is sometimes displayed in the output window. In general, this is because an exception occurs in the program and the output is captured by VC.

When running a program in the debugger, if the program generates an exception, the debugger will first receive a notification (that is, the first-chance exception), and the program that generates the exception will capture the exception. If the program does not capture this exception, the debugger will be notified again (that is, second-chance exception, last-chance exception) and end the program.

The common "first-chance exception" is generally "0xc0000005: access violation", "0xc00000fd: Stack Overflow", and so on. These indicate that the program has defects and must be corrected.

however, some situations are normal, such as "first-chance exception in xxx.exe (kernel32.dll): 0xe06d7363: microsoft C ++ exception ". In Windows, structured exceptions (seh) are widely used to handle special situations. Many APIs that deal with the underlying layer rely on seh to handle possible exceptions. In addition, the Code of seh is captured in these APIs, and the exceptions will not affect the program. However, due to the "first-chance exception, second-chance exception" mechanism mentioned above, VC still has output, but we can ignore it completely. If you really do not like the output information, you must disable "first-chance exception" capture for a specific exception.

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.