Skip to content

Commit a9a002c

Browse files
committed
Enable exception traces by default.
1 parent f5ff6f5 commit a9a002c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/guide/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ The following environment variables may be helpful when troubleshooting issues:
209209
| BN_DISABLE_USER_SETTINGS | Flag (True if exists) | This flag will cause Binary Ninja to ignore any [`settings.json`](https://docs.binary.ninja/guide/settings.html).|
210210
| BN_SCREENSHOT | Flag (True if exists) | This flag removes some small UI clutter to enable cleaner screenshots. |
211211
| BN_DEBUG_HTTP | Flag (True if exists) | This flag enables additional debug logging of HTTP activity. |
212-
| BN_DEBUG_EXCEPTION_TRACES | Flag (True if exists) | This variable includes stack traces when exceptions are handled (MacOS and Linux only). |
212+
| BN_DEBUG_EXCEPTION_TRACES | Flag (Enabled by default, disabled if set to "0") | This variable includes stack traces when exceptions are handled (MacOS and Linux only). |
213213
| BN_DEBUG_CLANG | Flag (True if exists) | If set, this flag adds additional debugging information to stdout from clang type parsing. |
214214

215215

exceptions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ BinaryNinja::ExceptionWithStackTrace::ExceptionWithStackTrace(const std::string&
2626
{
2727
m_originalMessage = message;
2828
m_message = message;
29-
if (getenv("BN_DEBUG_EXCEPTION_TRACES"))
29+
if (auto var = getenv("BN_DEBUG_EXCEPTION_TRACES"); !var || var[0] != '0')
3030
{
3131
char* stackTrace = BNGetCurrentStackTraceString();
3232
if (stackTrace)
@@ -88,7 +88,7 @@ BinaryNinja::ExceptionWithStackTrace::ExceptionWithStackTrace(std::exception_ptr
8888
m_message = "Some unknown exception";
8989
}
9090
}
91-
if (getenv("BN_DEBUG_EXCEPTION_TRACES"))
91+
if (auto var = getenv("BN_DEBUG_EXCEPTION_TRACES"); !var || var[0] != '0')
9292
{
9393
char* stackTrace = BNGetCurrentStackTraceString();
9494
if (stackTrace)

0 commit comments

Comments
 (0)