]> git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/groups/funcmacro_debug.h
b13ed8c4f3fcaffa6201ae7b9f3a34a279c2f353
[wxWidgets.git] / docs / doxygen / groups / funcmacro_debug.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: funcmacro_debug.h
3 // Purpose: Debugging function and macro group docs
4 // Author: wxWidgets team
5 // RCS-ID: $Id: funcmacro_gdi.h 52454 2008-03-12 19:08:48Z BP $
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10
11 @defgroup group_funcmacro_debug Debugging macros
12 @ingroup group_funcmacro
13
14 Useful macros and functions for error checking and defensive programming.
15
16 Starting with wxWidgets 2.9.1, debugging support in wxWidgets is always
17 compiled in by default, you need to explicitly define ::wxDEBUG_LEVEL as 0 to
18 disable it completely. However, by default debugging macros are dormant in the
19 release builds, i.e. when the main program is compiled with the standard @c
20 NDEBUG symbol being defined. You may explicitly activate the debugging checks
21 in the release build by calling wxSetAssertHandler() with a custom function if
22 needed.
23
24 When debugging support is active, failure of both wxASSERT() and wxCHECK()
25 macros conditions result in a debug alert. When debugging support is inactive
26 or turned off entirely at compilation time, wxASSERT() and wxFAIL() macros
27 don't do anything while wxCHECK() still checks its condition and returns if it
28 fails, even if no alerts are shown to the user.
29
30 Finally, the compile time assertions don't happen during the run-time but
31 result in the compilation error messages if the condition they check fail.
32 They are always enabled and are not affected by ::wxDEBUG_LEVEL.
33
34 Related class group: @ref group_class_debugging.
35
36 */
37