GitOrigin-RevId: 898715b95257e98717295b93acd16c3d31496c35
This commit is contained in:
Andrey Lisin
2024-02-26 13:38:22 +01:00
committed by intellij-monorepo-bot
parent 59847e0289
commit 7e9baa6bc8
2 changed files with 7 additions and 13 deletions

View File

@@ -320,7 +320,7 @@ public class MultiProcessDebugger implements ProcessDebugger {
List<PyThreadInfo> 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<PyThreadInfo> collectAllThreads() {
List<PyThreadInfo> result = new ArrayList<>();
result.addAll(myMainDebugger.getThreads());
List<PyThreadInfo> 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);
}