IDE: rundebug: restore toolstatus on error

git-svn-id: trunk@60730 -
This commit is contained in:
mattias 2019-03-19 23:57:21 +00:00
parent df9b585827
commit 1b4646b785

View File

@ -7188,16 +7188,20 @@ begin
end; end;
debugln('Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=',EnvironmentOptions.DebuggerConfig.DebuggerClass); debugln('Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=',EnvironmentOptions.DebuggerConfig.DebuggerClass);
Handled:=false; try
Result:=DoCallRunDebug(Handled); Result := mrCancel;
if Handled then begin Handled:=false;
Result := DoCallRunDebug(Handled);
if Handled or (Result<>mrOk) then
exit;
Result := mrCancel;
Result := DebugBoss.StartDebugging;
finally
if Result<>mrOk then if Result<>mrOk then
ToolStatus:=itNone; ToolStatus:=itNone;
exit;
end; end;
Result := DebugBoss.StartDebugging;
DebugLn('Hint: (lazarus) [TMainIDE.DoRunProject] END'); DebugLn('Hint: (lazarus) [TMainIDE.DoRunProject] END');
end; end;