diff --git a/ide/main.pp b/ide/main.pp index 34feb848b6..a6fdfb41a4 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -7180,18 +7180,19 @@ begin debugln('Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=',EnvironmentOptions.DebuggerConfig.DebuggerClass); try - Result := mrCancel; + Result:=mrCancel; Handled:=false; Result := DoCallRunDebug(Handled); - if Handled or (Result<>mrOk) then + if Handled then exit; - - Result := mrCancel; - Result := DebugBoss.StartDebugging; finally if Result<>mrOk then ToolStatus:=itNone; end; + if Result<>mrOk then + exit; + + Result := DebugBoss.StartDebugging; DebugLn('Hint: (lazarus) [TMainIDE.DoRunProject] END'); end;