xtd 0.2.0
Loading...
Searching...
No Matches
debug.cpp

Shows how to use debug class.

// Specify -DDEBUG when compiling or add #define DEBUG in the source file.
#include <xtd/diagnostics/debug>
#include <xtd/diagnostics/ostream_trace_listener>
#include <xtd/console>
using namespace xtd;
using namespace xtd::diagnostics;
auto main() -> int {
debug::listeners().push_back(new_ptr<ostream_trace_listener>(console::out));
debug::auto_flush(true);
debug::indent();
debug::write_line("Entering Main");
console::write_line("Hello World.");
debug::write_line("Exiting Main");
debug::unindent();
}
// This code produces the following output :
//
// Entering Main
// Hello World.
// Exiting Main
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10