From c67be2ea44e19637fbce0a2a1794824ffb8de797 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 9 May 2024 14:50:47 +0200 Subject: [PATCH] FpDebug: Return errors when the debugger can't start. From 190b5e77a75354bb74c9690c40ec2c79299a748b --- components/fpdebug/fpdbgcontroller.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/fpdebug/fpdbgcontroller.pas b/components/fpdebug/fpdbgcontroller.pas index f2686df6f9..658e9ed2d0 100644 --- a/components/fpdebug/fpdbgcontroller.pas +++ b/components/fpdebug/fpdbgcontroller.pas @@ -1631,12 +1631,14 @@ begin if assigned(FMainProcess) then begin DebugLn(DBG_WARNINGS, 'The debuggee is already running'); + FLastError := CreateError(fpInternalErr, ['The debugger is already running']); Exit; end; if FExecutableFilename = '' then begin DebugLn(DBG_WARNINGS, 'No filename given to execute.'); + FLastError := CreateError(fpInternalErr, ['No filename given to execute.']); Exit; end; @@ -1652,6 +1654,7 @@ begin begin result := false; DebugLn(DBG_WARNINGS, 'Error - No support registered for debug target'); + FLastError := CreateError(fpInternalErr, ['Unknown target for file: ' + FExecutableFilename]); Exit; end; @@ -1663,6 +1666,7 @@ begin begin Result := false; DebugLn(DBG_WARNINGS, 'Error - could not create TDbgProcess'); + FLastError := CreateError(fpInternalErr, ['could not create TDbgProcess']); Exit; end;