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;
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;