次の方法で共有


CRT Debug Library Use

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The C run-time library provides extensive debugging support. To use one of the CRT debug libraries, you must link with /DEBUG and compile with /MDd, /MTd, or /LDd.

Remarks

The main definitions and macros for CRT debugging can be found in the CRTDBG.h header file.

The functions in the CRT debug libraries are compiled with debug information (/Z7, /Zd, /Zi, /ZI (Debug Information Format)) and without optimization. Some functions contain assertions to verify parameters that are passed to them, and source code is provided. With this source code, you can step into CRT functions to confirm that the functions are working as you expect and check for bad parameters or memory states. (Some CRT technology is proprietary and does not provide source code for exception handling, floating point, and a few other routines.)

For more information on the various run-time libraries you can use, see C Run-Time Libraries.

See also