Re: Eclipse subclass breakpoint



Optional <google@xxxxxxxxxxxxxxxxx> wrote:
Anybody know how to set a breakpoint on a method in a superclass and
have break only in a specific subclass invocation?

class A {
void aMethod(){                  < setbreakpoint w/ condition X
}

class B extends A{
}

class C extends A{
}
....

B b = new B();
b.aMethod();                      < break

C c = new C();
c.aMethod();                      < no break

You can try to use a condition on getClass() == your.sub.Class

   robert

.