I am trying to debug an application I'm building. This bug appears to be causing one of my methods to fire prematurely, and I'd like to know why. So, I'll use a breakpoint. I want the debugger to stop at the very line where that method is invoked.
Suppose, for example, that I have a class with just three methods, defined as follows:
If someMethod causes methodThatWorks to be invoked, I want the program to stop execution at the [self methodThatWorks] line in someMethod. Likewise, if someOtherMethod causes methodThatWorks to be invoked, I want the program to stop execution at the [self methodThatWorks] line in someOtherMethod.
I thought setting a symbolic breakpoint would do the trick, but what really happens is the debugger puts the breakpoint in the method that is called.
Edit: Here's a screenshot to illustrate what's happening. Note that this screenshot is not from the app I'm building - it's from a project I just built today:
Suppose, for example, that I have a class with just three methods, defined as follows:
Code:
-(void)methodThatWorks
{
// do something productive
}
-(void)someMethod
{
if (X)
{
[self methodThatWorks];
}
}
-(void)someOtherMethod
{
if (Y)
{
[self methodThatWorks];
}
}
If someMethod causes methodThatWorks to be invoked, I want the program to stop execution at the [self methodThatWorks] line in someMethod. Likewise, if someOtherMethod causes methodThatWorks to be invoked, I want the program to stop execution at the [self methodThatWorks] line in someOtherMethod.
I thought setting a symbolic breakpoint would do the trick, but what really happens is the debugger puts the breakpoint in the method that is called.
Edit: Here's a screenshot to illustrate what's happening. Note that this screenshot is not from the app I'm building - it's from a project I just built today:
Last edited: