You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow configuring Windows minidump type via sentry_options_t API in C++ SDK #1335
The Sentry C++ SDK (sentry-native) currently generates minimal crash dumps on Windows using Crashpad. While this works for basic crash diagnostics, it lacks deeper memory-related information, such as heap state, handles, or full memory regions. In debugging complex issues (e.g., heap corruption, access violations, resource leaks), this limitation makes crash analysis significantly harder.
Although Crashpad internally supports various minidump levels via MINIDUMP_TYPE (e.g., MiniDumpWithFullMemory, MiniDumpWithHandleData), the current Sentry C++ API does not provide any mechanism to configure or override this behavior. As a result, users are forced to fork or wrap Crashpad themselves to generate richer dumps, which is error-prone and difficult to maintain.
Solution Brainstorm
Expose a new API in sentry_options_t to configure the desired Windows minidump level (e.g., via flags or an enum representing MINIDUMP_TYPE values). This option could be transparently passed to Crashpad at initialization time via command-line arguments or inter-process communication, similar to how other options are forwarded to the crashpad_handler.
Example proposal (pseudo-API):
void sentry_options_set_windows_minidump_type(sentry_options_t* opts, unsigned int minidump_type);
Where minidump_type is a bitmask compatible with Windows' MINIDUMP_TYPE enum.
This would allow users to enable richer dump types like:
MiniDumpWithFullMemory
MiniDumpWithHandleData
MiniDumpWithThreadInfo
...
without needing to fork or modify Crashpad directly.
Sounds like a good idea. We recently had a similar conversation internally. The Win32 API exposes a way to configure MiniDump contents based on a particular type specification, and the sole reason they aren't exposed in the Native SDK is that we cannot provide this cross-platform. But that doesn't mean we can't expose a Windows-specific function that applies to breakpad and crashpad.
For interaction with sentry_options_set_minidump_mode(), would you prefer explicit flags to retain precedence, or should the most recently called setter win?
No strong opinion on that because I think either works, but to me it sounds less surprising if the most recently called setter wins.
Alternatively, you could introduce CUSTOM minidump mode to make it explicit and avoid surprises.
Thanks @jpnurmi. I agree that the most recently called setter winning is the least surprising behavior.
My preference would be to keep sentry_minidump_mode_t unchanged rather than expose a public CUSTOM value, since callers could otherwise select custom mode without providing flags. Internally, the Windows flags setter could activate the override, while a subsequent call to sentry_options_set_minidump_mode() would clear it and restore the selected preset.
Does that approach sound preferable, or would you rather expose CUSTOM publicly?
Thanks @jpnurmi. I agree that the most recently called setter winning is the least surprising behavior. My preference would be to keep sentry_minidump_mode_t unchanged rather than expose a public CUSTOM value, since callers could otherwise select custom mode without providing flags. Internally, the Windows flags setter could activate the override, while a subsequent call to sentry_options_set_minidump_mode() would clear it and restore the selected preset. Does that approach sound preferable, or would you rather expose CUSTOM publicly?
I get the feeling that no matter how we structure the API, there's always some way to misuse it. 🙂 Probably a matter of documenting that the two functions are mutually exclusive, and logging a warning when overriding the other because it could be an oversight.
Understood, thanks @jpnurmi. I’ll proceed with the internal override and last-setter-wins behavior, document that the two setters are mutually exclusive, log a warning when either setter replaces an active setting from the other, and cover both calling orders in tests.
Activity
linear commentedon Aug 8, 2025
ENG-4790 Allow configuring Windows minidump type via sentry_options_t API in C++ SDK
getsantry commentedon Aug 8, 2025
Assigning to @getsentry/support for routing ⏲️
linear commentedon Aug 8, 2025
NATIVE-112 Allow configuring Windows minidump type via sentry_options_t API in C++ SDK
supervacuus commentedon Aug 12, 2025
Sounds like a good idea. We recently had a similar conversation internally. The Win32 API exposes a way to configure MiniDump contents based on a particular type specification, and the sole reason they aren't exposed in the Native SDK is that we cannot provide this cross-platform. But that doesn't mean we can't expose a Windows-specific function that applies to
breakpadandcrashpad.24 remaining items
jpnurmi commentedon Jul 24, 2026
Alternatively, you could introduce
CUSTOMminidump mode to make it explicit and avoid surprises.HuzaifaAbdulRehman commentedon Jul 24, 2026
Thanks @jpnurmi. I agree that the most recently called setter winning is the least surprising behavior.
My preference would be to keep sentry_minidump_mode_t unchanged rather than expose a public CUSTOM value, since callers could otherwise select custom mode without providing flags. Internally, the Windows flags setter could activate the override, while a subsequent call to sentry_options_set_minidump_mode() would clear it and restore the selected preset.
Does that approach sound preferable, or would you rather expose CUSTOM publicly?
jpnurmi commentedon Jul 24, 2026
I get the feeling that no matter how we structure the API, there's always some way to misuse it. 🙂 Probably a matter of documenting that the two functions are mutually exclusive, and logging a warning when overriding the other because it could be an oversight.
HuzaifaAbdulRehman commentedon Jul 24, 2026
Understood, thanks @jpnurmi. I’ll proceed with the internal override and last-setter-wins behavior, document that the two setters are mutually exclusive, log a warning when either setter replaces an active setting from the other, and cover both calling orders in tests.