I set up my application to either send debugging output to console or a log file. Now, I\'d like to decide with in the code whether
The simplest solution actually is
_isDebugging = isatty(STDERR_FILENO);
It isn't exactly the same as telling whether the app is running under debugger, but good enough (even better?) to determine whether the log should be written to disk.