diff --git a/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/MultiProcessDebugger.java b/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/MultiProcessDebugger.java index 39f2cbc159c8..d6cdc5d6dcd1 100644 --- a/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/MultiProcessDebugger.java +++ b/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/MultiProcessDebugger.java @@ -320,7 +320,7 @@ public class MultiProcessDebugger implements ProcessDebugger { List threads = collectAllThreads(); - if (myOtherDebuggers.size() > 0) { + if (!myOtherDebuggers.isEmpty()) { //here we add process id to thread name in case there are more then one process return Collections.unmodifiableCollection(Collections2.transform(threads, t -> { if (t == null) return null; @@ -339,12 +339,11 @@ public class MultiProcessDebugger implements ProcessDebugger { } private List collectAllThreads() { - List result = new ArrayList<>(); - result.addAll(myMainDebugger.getThreads()); + List result = new ArrayList<>(myMainDebugger.getThreads()); - //collect threads and add them to registry to faster access - //we don't register mainDebugger as it is default if there is no mapping + // Collect threads and add them to registry to faster access + // we don't register mainDebugger as it is default if there is no mapping. for (RemoteDebugger d : myOtherDebuggers) { result.addAll(d.getThreads()); for (PyThreadInfo t : d.getThreads()) { @@ -636,10 +635,6 @@ public class MultiProcessDebugger implements ProcessDebugger { } } - public void removeCloseListener(RemoteDebuggerCloseListener listener) { - myMainDebugger.removeCloseListener(listener); - } - public void addOtherDebuggerCloseListener(DebuggerProcessListener otherDebuggerCloseListener) { myOtherDebuggerCloseListener.add(otherDebuggerCloseListener); } diff --git a/python/src/com/jetbrains/python/debugger/PyDebugProcess.java b/python/src/com/jetbrains/python/debugger/PyDebugProcess.java index b8a7d5cba8e5..cdba056e13db 100644 --- a/python/src/com/jetbrains/python/debugger/PyDebugProcess.java +++ b/python/src/com/jetbrains/python/debugger/PyDebugProcess.java @@ -27,7 +27,6 @@ import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.progress.Task; import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.Key; import com.intellij.openapi.util.NlsActions; import com.intellij.openapi.util.NlsContexts.ProgressText; import com.intellij.openapi.util.NlsContexts.ProgressTitle; @@ -287,7 +286,7 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr // which causes the process to finish with a non-zero exit code or the `KeyboardInterrupt` exception. // This issue happens frequently with multiprocess debugging. getProcessHandler().waitFor(); - handleStop(); //in case of normal debug we stop the session + handleStop(); // In case of normal debug, we stop the session } protected void handleStop() { @@ -839,11 +838,11 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr public XValueChildrenList loadFrame(@Nullable final XStackFrame contextFrame) throws PyDebuggerException { final PyStackFrame frame = contextFrame == null ? currentFrame() : (PyStackFrame)contextFrame; synchronized (myFrameCacheObject) { - //do not reload frame every time it is needed, because due to bug in pdb, reloading frame clears all variable changes + // Do not reload frame every time it is needed, because due to a bug in pdb, reloading frame clears all variable changes. if (!myStackFrameCache.containsKey(frame.getThreadFrameId())) { XValueChildrenList values = myDebugger.loadFrame(frame.getThreadId(), frame.getFrameId(), ProcessDebugger.GROUP_TYPE.DEFAULT); // Could be null when the current function is called for a thread that is already dead. - // In this case a new element shouldn't be added to myStackFrameCache + // In this case, a new element shouldn't be added to myStackFrameCache. if (values == null) { return null; }