void (final XBreakpoint<?> breakpoint) { addSessionListener(new XDebugSessionListener() { private void removeBreakpoint() { XDebuggerUtil.getInstance().removeBreakpoint(myProject, breakpoint); removeSessionListener(this); } @Override public void sessionResumed() { removeBreakpoint(); } @Override public void sessionStopped() { removeBreakpoint(); } }); }