Skip to content

Add a comment about using --gtest_catch_exceptions=0 to get full stack traces #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions testing/test_framework/src/firebase_test_framework.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ char** EditMainArgsForGoogleTest(int* argc, char* argv[]) {
// e.g. modified_args.push_back("--gtest_list_tests");
// e.g. modified_args.push_back("--gtest_filter=MyTestFixture.MyTest");

// Disable googletest's exception handling logic when debugging test failures
// due to exceptions. This can be helpful because when exceptions are handled
// by googletest (the default) the stack traces are lost; however, when they
// are instead allowed to bubble up and crash the app then helpful stack
// traces are usually included as part of the crash dump.
// See https://goo.gle/2WcC3fV for details.
// modified_args.push_back("--gtest_catch_exceptions=0");

// Create a new `argv` with the elements from the `modified_args` vector and
// write the new count back to `argc`. The memory leaks produced by
// `VectorToArgcArgv` acceptable because they last for the entire application.
Expand Down