diff --git a/include/internal/catch_debugger.hpp b/include/internal/catch_debugger.hpp index 64383b46..25eeafe6 100644 --- a/include/internal/catch_debugger.hpp +++ b/include/internal/catch_debugger.hpp @@ -95,6 +95,14 @@ { return IsDebuggerPresent() != 0; } +#elif defined(__MINGW32__) + extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); + extern "C" __declspec(dllimport) void __stdcall DebugBreak(); + #define BreakIntoDebugger() if (IsDebuggerPresent() ) { DebugBreak(); } + inline bool isDebuggerActive() + { + return IsDebuggerPresent() != 0; + } #else inline void BreakIntoDebugger(){} inline bool isDebuggerActive() { return false; }