mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-155007 IDEA does not kill the debug process immediately
This commit is contained in:
+5
@@ -31,6 +31,7 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
||||
private StateRestoringCheckBox myCbForceClassicVM;
|
||||
private JCheckBox myCbDisableJIT;
|
||||
private JCheckBox myCbShowAlternativeSource;
|
||||
private JCheckBox myCbKillImmediately;
|
||||
|
||||
@Override
|
||||
public void reset(@NotNull DebuggerSettings settings) {
|
||||
@@ -50,6 +51,7 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
||||
myCbForceClassicVM.setSelected(settings.FORCE_CLASSIC_VM);
|
||||
myCbDisableJIT.setSelected(settings.DISABLE_JIT);
|
||||
myCbShowAlternativeSource.setSelected(settings.SHOW_ALTERNATIVE_SOURCE);
|
||||
myCbKillImmediately.setSelected(settings.KILL_PROCESS_IMMEDIATELY);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,6 +69,7 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
||||
settings.FORCE_CLASSIC_VM = myCbForceClassicVM.isSelectedWhenSelectable();
|
||||
settings.DISABLE_JIT = myCbDisableJIT.isSelected();
|
||||
settings.SHOW_ALTERNATIVE_SOURCE = myCbShowAlternativeSource.isSelected();
|
||||
settings.KILL_PROCESS_IMMEDIATELY = myCbKillImmediately.isSelected();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,6 +87,7 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
||||
myCbShowAlternativeSource = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.show.alternative.source"));
|
||||
myRbSocket = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.socket"));
|
||||
myRbShmem = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.shmem"));
|
||||
myCbKillImmediately = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.kill.immediately"));
|
||||
|
||||
final ButtonGroup gr = new ButtonGroup();
|
||||
gr.add(myRbSocket);
|
||||
@@ -101,6 +105,7 @@ class DebuggerLaunchingConfigurable implements ConfigurableUi<DebuggerSettings>
|
||||
panel.add(myCbForceClassicVM);
|
||||
panel.add(myCbDisableJIT);
|
||||
panel.add(myCbShowAlternativeSource);
|
||||
panel.add(myCbKillImmediately);
|
||||
|
||||
JPanel result = new JPanel(new BorderLayout());
|
||||
result.add(panel, BorderLayout.NORTH);
|
||||
|
||||
@@ -83,6 +83,8 @@ public class DebuggerSettings implements Cloneable, PersistentStateComponent<Ele
|
||||
public volatile boolean WATCH_RETURN_VALUES = false;
|
||||
public volatile boolean AUTO_VARIABLES_MODE = false;
|
||||
|
||||
public volatile boolean KILL_PROCESS_IMMEDIATELY = false;
|
||||
|
||||
public String EVALUATE_FINALLY_ON_POP_FRAME = EVALUATE_FINALLY_ASK;
|
||||
|
||||
public boolean RESUME_ONLY_CURRENT_THREAD = false;
|
||||
@@ -159,6 +161,7 @@ public class DebuggerSettings implements Cloneable, PersistentStateComponent<Ele
|
||||
FORCE_CLASSIC_VM == secondSettings.FORCE_CLASSIC_VM &&
|
||||
DISABLE_JIT == secondSettings.DISABLE_JIT &&
|
||||
SHOW_ALTERNATIVE_SOURCE == secondSettings.SHOW_ALTERNATIVE_SOURCE &&
|
||||
KILL_PROCESS_IMMEDIATELY == secondSettings.KILL_PROCESS_IMMEDIATELY &&
|
||||
HOTSWAP_IN_BACKGROUND == secondSettings.HOTSWAP_IN_BACKGROUND &&
|
||||
SKIP_SYNTHETIC_METHODS == secondSettings.SKIP_SYNTHETIC_METHODS &&
|
||||
SKIP_CLASSLOADERS == secondSettings.SKIP_CLASSLOADERS &&
|
||||
|
||||
+13
@@ -16,12 +16,15 @@
|
||||
package com.intellij.execution.application;
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.JavaModuleGraphUtil;
|
||||
import com.intellij.debugger.settings.DebuggerSettings;
|
||||
import com.intellij.diagnostic.logging.LogConfigurationPanel;
|
||||
import com.intellij.execution.*;
|
||||
import com.intellij.execution.configuration.EnvironmentVariablesComponent;
|
||||
import com.intellij.execution.configurations.*;
|
||||
import com.intellij.execution.filters.TextConsoleBuilderFactory;
|
||||
import com.intellij.execution.junit.RefactoringListeners;
|
||||
import com.intellij.execution.process.KillableProcessHandler;
|
||||
import com.intellij.execution.process.OSProcessHandler;
|
||||
import com.intellij.execution.runners.ExecutionEnvironment;
|
||||
import com.intellij.execution.util.JavaParametersUtil;
|
||||
import com.intellij.execution.util.ProgramParametersUtil;
|
||||
@@ -285,6 +288,16 @@ public class ApplicationConfiguration extends ModuleBasedConfiguration<JavaRunCo
|
||||
return params;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected OSProcessHandler startProcess() throws ExecutionException {
|
||||
OSProcessHandler processHandler = super.startProcess();
|
||||
if (processHandler instanceof KillableProcessHandler && DebuggerSettings.getInstance().KILL_PROCESS_IMMEDIATELY) {
|
||||
((KillableProcessHandler)processHandler).setShouldKillProcessSoftly(false);
|
||||
}
|
||||
return processHandler;
|
||||
}
|
||||
|
||||
private static void setupModulePath(JavaParameters params, JavaRunConfigurationModule module) {
|
||||
JavaSdkVersion version = null;
|
||||
Sdk jdk = params.getJdk();
|
||||
|
||||
@@ -236,6 +236,7 @@ label.debugger.launching.configurable.debugger.transport=Transport:
|
||||
label.debugger.launching.configurable.socket=&Socket
|
||||
label.debugger.launching.configurable.shmem=Shared &memory
|
||||
label.debugger.general.configurable.show.alternative.source=Show alternative source switcher
|
||||
label.debugger.general.configurable.kill.immediately=Kill the debug process immediately
|
||||
label.debugger.general.configurable.skip.synthetic.methods=Ski&p synthetic methods
|
||||
label.debugger.general.configurable.skip.constructors=Skip &constructors
|
||||
label.debugger.general.configurable.skip.classLoaders=Skip class l&oaders
|
||||
|
||||
Reference in New Issue
Block a user