From 1b4646b78546fb0af39c20109d7b9af8d5236e1f Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 19 Mar 2019 23:57:21 +0000 Subject: [PATCH] IDE: rundebug: restore toolstatus on error git-svn-id: trunk@60730 - --- ide/main.pp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ide/main.pp b/ide/main.pp index de098381b9..02592545be 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -7188,16 +7188,20 @@ begin end; debugln('Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=',EnvironmentOptions.DebuggerConfig.DebuggerClass); - Handled:=false; - Result:=DoCallRunDebug(Handled); - if Handled then begin + try + Result := mrCancel; + Handled:=false; + Result := DoCallRunDebug(Handled); + if Handled or (Result<>mrOk) then + exit; + + Result := mrCancel; + Result := DebugBoss.StartDebugging; + finally if Result<>mrOk then ToolStatus:=itNone; - exit; end; - Result := DebugBoss.StartDebugging; - DebugLn('Hint: (lazarus) [TMainIDE.DoRunProject] END'); end;