Skip to content
Advertisement

How to use conditional breakpoint in Eclipse?

I want to know how to place a conditional breakpoint in Eclipse. I have a code like:

public static void doForAllTabs(String[] tablist){
    for(int i = 0; i<tablist.length;i++){
-->        doIt(tablist[i]);
    }
}

Now I want to put a breakpoint on the line with the arrow but want it to trigger only if:

tablist[i].equalsIgnoreCase("LEADDELEGATES");

Advertisement

Answer

Put your breakpoint. Right-click the breakpoint image on the margin and choose Breakpoint Properties:

enter image description here

Configure condition as you see fit:

enter image description here

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement