From ebd1e8b5c48d16e293bcd34487f7e41a42916a2d Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Tue, 26 Jul 2016 18:37:24 +0300 Subject: [PATCH] do not show failed debugger start notification if the process died before attach --- .../src/com/intellij/debugger/engine/DebugProcessImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java b/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java index 7ee567d0d4df..122e5a314fbc 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java @@ -1971,12 +1971,16 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb } } else { + ProcessHandler processHandler = getProcessHandler(); + boolean terminated = + processHandler != null && (processHandler.isProcessTerminating() || processHandler.isProcessTerminated()); + fail(); DebuggerInvocationUtil.swingInvokeLater(myProject, () -> { // propagate exception only in case we succeeded to obtain execution result, // otherwise if the error is induced by the fact that there is nothing to debug, and there is no need to show // this problem to the user - if (myExecutionResult != null || !connectorIsReady.get()) { + if ((myExecutionResult != null && !terminated) || !connectorIsReady.get()) { ExecutionUtil.handleExecutionError(myProject, ToolWindowId.DEBUG, sessionName, e); } });