Skip to content
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

[GTest] How do i debug a c++ test with Gtest? #12607

Open
aronnoordam opened this issue Aug 5, 2024 · 2 comments
Open

[GTest] How do i debug a c++ test with Gtest? #12607

aronnoordam opened this issue Aug 5, 2024 · 2 comments

Comments

@aronnoordam
Copy link
Member

aronnoordam commented Aug 5, 2024

When I run a c++ test with gtest, the test runs, but my breakpoints are not hit.

How can I make sure my breakpoints are hit?

I've build everything with the debug configuration

@loumalouomega
Copy link
Member

First I would use filter to run just the test you are trying to debug.

./you_application_test --gtest_filter="*your_test_name*"

For the rest it works as any gtest, so i guess should be --gtest_break_on_failure

@aronnoordam
Copy link
Member Author

I've already used both suggestions, but it doesnt work.

For clarification, im using pycharm to start the Gtest process, then in visual studio I attach to my python process

This workflow works for me when running MainKratos.py, but not when running the c++ tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants