Skip to content

Commit

Permalink
Disable all breakpoints bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
SougandhS committed Oct 11, 2024
1 parent 6887f61 commit 5cd0617
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,24 @@ public class DisableAllBreakpointsAction extends AbstractRemoveAllActionDelegate

@Override
protected boolean isEnabled() {
return DebugPlugin.getDefault().getBreakpointManager().getBreakpoints().length > 0;
boolean allDisabled = true;
IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
IBreakpoint[] breakpoints = breakpointManager.getBreakpoints();

for (IBreakpoint bp : breakpoints) {
try {
if (bp.isEnabled()) {
allDisabled = false;
break;
}
} catch (CoreException e) {
DebugUIPlugin.log(e);
}
}
if (breakpoints.length > 0 && allDisabled) {
return false;
}
return true;
}

@Override
Expand Down

0 comments on commit 5cd0617

Please sign in to comment.