funcmacro_debug.h 1.5 KB

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