mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not evaluate commands on UI thread (PY-23834)
This commit is contained in:
@@ -7,6 +7,7 @@ package com.jetbrains.python.debugger.pydev;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.intellij.execution.ui.ConsoleViewContentType;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
@@ -320,17 +321,19 @@ public class RemoteDebugger implements ProcessDebugger {
|
||||
|
||||
@Override
|
||||
public void execute(@NotNull final AbstractCommand command) {
|
||||
if (command instanceof ResumeOrStepCommand) {
|
||||
final String threadId = ((ResumeOrStepCommand)command).getThreadId();
|
||||
clearTempVariables(threadId);
|
||||
}
|
||||
ApplicationManager.getApplication().executeOnPooledThread(() -> {
|
||||
if (command instanceof ResumeOrStepCommand) {
|
||||
final String threadId = ((ResumeOrStepCommand)command).getThreadId();
|
||||
clearTempVariables(threadId);
|
||||
}
|
||||
|
||||
try {
|
||||
command.execute();
|
||||
}
|
||||
catch (PyDebuggerException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
try {
|
||||
command.execute();
|
||||
}
|
||||
catch (PyDebuggerException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
boolean sendFrame(final ProtocolFrame frame) {
|
||||
|
||||
Reference in New Issue
Block a user