void (final PyThreadInfo threadInfo, boolean updateSourcePosition) { if (!mySuspendedThreads.contains(threadInfo)) { mySuspendedThreads.add(threadInfo); final List<PyStackFrameInfo> frames = threadInfo.getFrames(); if (frames != null) { final PySuspendContext suspendContext = createSuspendContext(threadInfo); XBreakpoint<?> breakpoint = null; if (threadInfo.isStopOnBreakpoint()) { final PySourcePosition framePosition = frames.get(0).getPosition(); PySourcePosition position = myPositionConverter.convertFrameToPython(framePosition); breakpoint = myRegisteredBreakpoints.get(position); if (breakpoint == null) { myDebugger.removeTempBreakpoint(position.getFile(), position.getLine()); } } else if (threadInfo.isExceptionBreak()) { String exceptionName = threadInfo.getMessage(); if (exceptionName != null) { breakpoint = myRegisteredExceptionBreakpoints.get(exceptionName); } } if (breakpoint != null) { if ((breakpoint.getType().isSuspendThreadSupported()) && (breakpoint.getSuspendPolicy() == SuspendPolicy.ALL)) { suspendAllOtherThreads(threadInfo); } } if (updateSourcePosition) { if (breakpoint != null) { boolean shouldSuspend = getSession().breakpointReached(breakpoint, threadInfo.getMessage(), suspendContext); if (!shouldSuspend) resume(suspendContext); } else { ((XDebugSessionImpl)getSession()).positionReached(suspendContext, isFailedTestStop(threadInfo)); } } } } }