mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
PY-22979 Sending messages twice from IDE to main debugging process fixed
One of the consequences of the problem was skipping the next breakpoint occasionally after resuming the execution of a Python script because IDE sent `CMD_RUN` message twice to the main debugging script process.
This commit is contained in:
@@ -39,8 +39,6 @@ public class ClientModeMultiProcessDebugger implements ProcessDebugger {
|
||||
myPort = port;
|
||||
|
||||
myMainDebugger = createDebugger();
|
||||
|
||||
myOtherDebuggers.add(myMainDebugger);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -55,7 +53,7 @@ public class ClientModeMultiProcessDebugger implements ProcessDebugger {
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return getOtherDebuggers().stream().anyMatch(RemoteDebugger::isConnected);
|
||||
return allDebuggers().stream().anyMatch(RemoteDebugger::isConnected);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,7 +99,9 @@ public class ClientModeMultiProcessDebugger implements ProcessDebugger {
|
||||
private List<RemoteDebugger> allDebuggers() {
|
||||
List<RemoteDebugger> result;
|
||||
synchronized (myOtherDebuggersObject) {
|
||||
result = new ArrayList<>(myOtherDebuggers);
|
||||
result = new ArrayList<>(myOtherDebuggers.size() + 1);
|
||||
result.add(myMainDebugger);
|
||||
result.addAll(myOtherDebuggers);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user