Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Header <boost/test/debug.hpp>

defines portable debug interfaces

Intended to standardize interface of programs with debuggers

namespace boost {
  namespace debug {
    struct dbg_startup_info;

    typedef boost::function< void(dbg_startup_info const &)> dbg_starter;  // Signature of debugger starter routine. Takes an instance of dbg_startup_into as only argument. 
    bool under_debugger();

    // Cause program to break execution in debugger at call point. 
    void debugger_break();
    std::string set_debugger(unit_test::const_string, 
                             dbg_starter = dbg_starter());
    bool attach_debugger(bool = true);
    void detect_memory_leaks(bool, 
                             unit_test::const_string = unit_test::const_string());
    void break_memory_alloc(long);