Version: 3.0.2
debug.h File Reference

Macros

#define wxDEBUG_LEVEL
 Preprocessor symbol defining the level of debug support available.
 
#define __WXDEBUG__
 Compatibility macro indicating presence of debug support.
 
#define wxASSERT(condition)
 Assert macro.
 
#define wxASSERT_LEVEL_2(condition)
 Assert macro for expensive run-time checks.
 
#define wxASSERT_LEVEL_2_MSG(condition, msg)
 Assert macro with a custom message for expensive run-time checks.
 
#define wxASSERT_MIN_BITSIZE(type, size)
 This macro results in a compile time assertion failure if the size of the given type is less than size bits.
 
#define wxASSERT_MSG(condition, message)
 Assert macro with message.
 
#define wxCHECK(condition, retValue)
 Checks that the condition is true, returns with the given return value if not (stops execution in debug mode).
 
#define wxCHECK_MSG(condition, retValue, message)
 Checks that the condition is true, returns with the given return value if not (stops execution in debug mode).
 
#define wxCHECK_RET(condition, message)
 Checks that the condition is true, and returns if not (stops execution with the given error message in debug mode).
 
#define wxCHECK2(condition, operation)
 Checks that the condition is true, and if not, it will wxFAIL() and execute the given operation if it is not.
 
#define wxCHECK2_MSG(condition, operation, message)
 This is the same as wxCHECK2(), but wxFAIL_MSG() with the specified message is called instead of wxFAIL() if the condition is false.
 
#define wxCOMPILE_TIME_ASSERT(condition, message)
 Using wxCOMPILE_TIME_ASSERT() results in a compilation error if the specified condition is false.
 
#define wxCOMPILE_TIME_ASSERT2(condition, message, name)
 This macro is identical to wxCOMPILE_TIME_ASSERT() except that it allows you to specify a unique name for the struct internally defined by this macro to avoid getting the compilation errors described for wxCOMPILE_TIME_ASSERT().
 
#define wxDISABLE_ASSERTS_IN_RELEASE_BUILD()   wxDisableAsserts()
 Use this macro to disable asserts in release build when not using wxIMPLEMENT_APP().
 
#define wxFAIL
 Will always generate an assert error if this code is reached (in debug mode).
 
#define wxFAIL_MSG(message)
 Will always generate an assert error with specified message if this code is reached (in debug mode).
 

Typedefs

typedef void(* wxAssertHandler_t )(const wxString &file, int line, const wxString &func, const wxString &cond, const wxString &msg)
 Type for the function called in case of assert failure.
 

Functions

void wxAbort ()
 Exits the program immediately.
 
void wxDisableAsserts ()
 Disable the condition checks in the assertions.
 
bool wxIsDebuggerRunning ()
 Returns true if the program is running under debugger, false otherwise.
 
wxAssertHandler_t wxSetAssertHandler (wxAssertHandler_t handler)
 Sets the function to be called in case of assertion failure.
 
void wxSetDefaultAssertHandler ()
 Reset the assert handler to default function which shows a message box when an assert happens.
 
void wxTrap ()
 Generate a debugger exception meaning that the control is passed to the debugger if one is attached to the process.