xtd_c - Reference Guide 0.2.0
debugger.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include "../types.h"
8 #include <stdlib.h>
9 
27 
41 
50 
72 void xtd_diagnostics_debugger_log(int32_t level, const char* category, const char* message);
75 #if defined(_MSC_VER)
76 
88 #define debug_break_() \
89  if (xtd_diagnostics_debugger_launch()) __debugbreak()
90 #else
91 
103 #define debug_break_() \
104  if (xtd_diagnostics_debugger_launch()) abort()
105 #endif
bool xtd_diagnostics_debugger_is_logging()
Checks to see if logging is enabled by an attached debugger.
void xtd_diagnostics_debugger_log(int32_t level, const char *category, const char *message)
Posts a message for the attached debugger.
bool xtd_diagnostics_debugger_launch()
Launches and attaches a debugger to the process.
void xtd_diagnostics_debugger_debug_break()
Signals a breakpoint to an attached debugger.
bool xtd_diagnostics_debugger_is_attached()
Gets a value that indicates whether a debugger is attached to the process.