views:

53

answers:

1

I remote debug my application using JDB, just JDB, no IDEs, is there a way in jdb to set a conditional breakpoint?

eg: stop at MyClass:80 when mystr.equals("abc")

A: 

I don't think so. A cumbersome workaround is to sprinkle blocks like this through your code:

if (mystr.equals("abc")) {
    int dummy = 0;     //   <--- set breakpoint here
}
some_code();    // <-- this is where you wanted to set the conditional breakpoint
mobrule
Thanks for the suggestion, but won't work since I can't change the code.
Murali