Look at this code:
void F1() {
for (int i = 0; i < 100; i ++)
F2();
}
void F2() {
for (int i = 0; i < 100; i ++)
F3();
}
void F3() {
int a = 0; // break point here
for (int i = 0; i < 100; i ++)
a ++;
}
I want to put a break point at the line int a = 0;
in F3()
, but I only want to pause when i==70
in F1()
and i==80
in F2()
.
That means when I am in F3()
's scope, I have to peek F2()
's and F1()
's local variables. But in actual code, those two variables are not meant to be passed down.
What is the right way to do this?