void (final DebugProcessImpl debugProcess) { // need to delete the request immediately, see IDEA-133978 debugProcess.getRequestsManager().deleteRequest(this); debugProcess.addDebugProcessListener(new DebugProcessListener() { @Override public void resumed(SuspendContext suspendContext) { removeBreakpoint(); } @Override public void processDetached(@NotNull DebugProcess process, boolean closedByUser) { removeBreakpoint(); } private void removeBreakpoint() { AppUIUtil.invokeOnEdt(() -> DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager().removeBreakpoint(Breakpoint.this)); debugProcess.removeDebugProcessListener(this); } }); }