Comments (3)
I figured it out. set follow-fork-mode child
must be run just before forking the test case that you want to debug.
In practice I find it easiest to comment out all test cases before the test case I want to debug, so I can run set follow-fork-mode child
at the beginning of the program.
It would be nice to have a symbol to break on just before a specific test case fork, so I don't have to comment out tests.
from narwhal.
Hmm it seems like gdb can only follow one process at a time and stops whenever the process exits. If we set follow-fork-mode
to child
, gdb can't go back to the main process and just stops at the end of the first test.
I think introducing a dummy symbol might be a bit confusing but one way around the problem would be to have a simple way to only run a single test, without having to comment out everything else.
TEST_ONLY(example) {} // Only run this test
TEST(example, ONLY) {} // Could also be special test modifier
I think it's a feature that would also be useful on its own so I'll try to implement something like this when I have the time.
from narwhal.
Thanks, looks good :P
from narwhal.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from narwhal.