I have a BOOL variable. Let's call it Bob. I have a symbolic breakpoint at -[UIImageView setImage], and I want my program to break if - and only if - a variable named Bob is declared and is true. That is, given a piece of code like this:
the program should break after setImage is called in methodA, and then only if bob = true. But the program should not break in methodB.
Unfortunately, based on my experience, I predict that the following will actually happen:
If method A is called, the debugger will see a variable named "bob", and make sure it is true; if "bob" is false, then the program will not be paused.
If method B is called, the debugger will see that there is no variable named "bob" and will pause the program, since the debugger can't evaluate an undeclared variable.
Code:
-(void)methodA
{
BOOL bob = (some value);
UIImage *someImage = ...;
[imageView setImage:someImage];
}
-(void)methodB
{
UIImage *someOtherImage = ...;
[imageView setImage:someOtherImage];
}
the program should break after setImage is called in methodA, and then only if bob = true. But the program should not break in methodB.
Unfortunately, based on my experience, I predict that the following will actually happen:
If method A is called, the debugger will see a variable named "bob", and make sure it is true; if "bob" is false, then the program will not be paused.
If method B is called, the debugger will see that there is no variable named "bob" and will pause the program, since the debugger can't evaluate an undeclared variable.