I wanna do something like this:
int main() {
try { runApp(); }
catch(std::exception const& ex) {
if(runningInDebugger()) throw; // let the IDE show me what went wrong
else displayMsgBox("Something went wrong! " + ex.what());
}
}
Needs to work at least in VS2008 but the more debuggers it supports, the better.
I want it to check for a debugger at runtime. I don't want to do "#ifdef NDEBUG", because I prefer not to do release builds at all (can't be bothered).
So what should I use as a "runningInDebugger()" check?