Skip to content

Commit

Permalink
feat: enable debug-option by default in debug-build. (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
supervacuus authored Jan 27, 2025
1 parent 3dc60ed commit 2aa4b16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

**Features**:

- Enable debug-option by default when running in a debug-build. ([#1128](https://github.com/getsentry/sentry-native/pull/1128))

**Fixes**:

- Allow older toolchains with assemblers that don't support PAC-stripping instructions on `aarch64` to compile `crashpad`. ([#1125](https://github.com/getsentry/sentry-native/pull/1125), [crashpad#118](https://github.com/getsentry/crashpad/pull/118))
Expand Down
5 changes: 5 additions & 0 deletions src/sentry_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ sentry_options_new(void)
sentry_options_set_dsn(opts, getenv("SENTRY_DSN"));
const char *debug = getenv("SENTRY_DEBUG");
opts->debug = debug && sentry__string_eq(debug, "1");
#if !defined(NDEBUG)
if (!opts->debug && (!debug || !sentry__string_eq(debug, "0"))) {
opts->debug = 1;
}
#endif
sentry_logger_t logger
= { sentry__logger_defaultlogger, NULL, SENTRY_LEVEL_DEBUG };
opts->logger = logger;
Expand Down

0 comments on commit 2aa4b16

Please sign in to comment.