diff --git a/components/fpdebug/app/fpd/fpdcommand.pas b/components/fpdebug/app/fpd/fpdcommand.pas index bb5d947bb6..e06a3cc661 100644 --- a/components/fpdebug/app/fpd/fpdcommand.pas +++ b/components/fpdebug/app/fpd/fpdcommand.pas @@ -163,6 +163,8 @@ begin end; procedure HandleRun(AParams: String; out CallProcessLoop: boolean); +var + AParamList: TStringList; begin CallProcessLoop:=false; if Assigned(GController.MainProcess) @@ -177,6 +179,16 @@ begin Exit; end; + if AParams<>'' then begin + AParamList := TStringList.Create; + try + AParamList.Text:=AParams; + GController.Params.Assign(AParamList); + finally + AParamList.free; + end; + end; + if not GController.Run then writeln('Failed to run '+GController.ExecutableFilename) else @@ -866,7 +878,7 @@ begin MCommands.AddCommand(['file', 'f'], @HandleFile, 'file : Loads the debuggee '); MCommands.AddCommand(['show', 's'], @HandleShow, 'show : Enter show help for more info'); MCommands.AddCommand(['set'], @HandleSet, 'set param: Enter set help for more info'); - MCommands.AddCommand(['run', 'r'], @HandleRun, 'run: Starts the loaded debuggee'); + MCommands.AddCommand(['run', 'r'], @HandleRun, 'run [params]: Starts the loaded debuggee'); MCommands.AddCommand(['break', 'b'], @HandleBreak, 'break [-d] |: Set a breakpoint at or . -d removes'); MCommands.AddCommand(['continue', 'cont', 'c'], @HandleContinue, 'continue: Continues execution'); MCommands.AddCommand(['kill', 'k'], @HandleKill, 'kill: Stops execution of the debuggee');