View Issue Details

IDProjectCategoryView StatusLast Update
0035649LazarusIDEpublic2019-06-04 15:11
ReportererrnoAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformPCOSWindowsOS Version10
Product Version2.1 (SVN)Product Build61300 
Target VersionFixed in Version2.0.4 
Summary0035649: "Run without debugging" ,parameters are not passed to the debugged process .
DescriptionWhen you add some parameteres in run\<run parameters...>\local\<command line parameters> . These parameters are
not passed to the debugged process when running the application without debugging it .
Steps To Reproduce-Open provided project project1.lpi
-Click on "run", the aplication shows :
Parameters passed as command line:
param1
param2
param3
Press enter
-Click on "run without debugging", the aplication shows :
Parameters passed as command line:
Press enter

parameters are not passed to the debugged process (bug)
Additional InformationPatch added.
TagsNo tags attached.
Fixed in Revision61318
LazTarget2.0.4
Widgetset
Attached Files
  • project1.zip (2,449 bytes)
  • Main.patch (916 bytes)
    Index: ide/main.pp
    ===================================================================
    --- ide/main.pp	(r�vision 61300)
    +++ ide/main.pp	(copie de travail)
    @@ -7208,6 +7208,7 @@
       Params: TStringListUTF8;
       RunAppBundle, Handled: Boolean;
       ARunMode: TRunParamsOptionsMode;
    +  i : integer;
     begin
       debugln(['Hint: (lazarus) [TMainIDE.DoRunProjectWithoutDebug] START']);
       if Project1=nil then
    @@ -7245,12 +7246,12 @@
             Format(lisUnableToRun2, ['<project has no target file>']),
             mtError, [mbOK]);
           exit(mrCancel);
    -    end else begin
    +    end else
           ExeFile:=Params[0];
    -      Params.Delete(0);
    -    end;
         //writeln('TMainIDE.DoRunProjectWithoutDebug ExeFile=',ExeFile);
         Process.Executable := ExeFile;
    +    for i:=1 to Params.Count-1 do
    +       Process.Parameters.Add(Params[i]);
         ARunMode := Project1.RunParameterOptions.GetActiveMode;
     
         if ARunMode<>nil then
    
    Main.patch (916 bytes)

Activities

errno

2019-05-30 02:24

reporter  

project1.zip (2,449 bytes)
Main.patch (916 bytes)
Index: ide/main.pp
===================================================================
--- ide/main.pp	(r�vision 61300)
+++ ide/main.pp	(copie de travail)
@@ -7208,6 +7208,7 @@
   Params: TStringListUTF8;
   RunAppBundle, Handled: Boolean;
   ARunMode: TRunParamsOptionsMode;
+  i : integer;
 begin
   debugln(['Hint: (lazarus) [TMainIDE.DoRunProjectWithoutDebug] START']);
   if Project1=nil then
@@ -7245,12 +7246,12 @@
         Format(lisUnableToRun2, ['<project has no target file>']),
         mtError, [mbOK]);
       exit(mrCancel);
-    end else begin
+    end else
       ExeFile:=Params[0];
-      Params.Delete(0);
-    end;
     //writeln('TMainIDE.DoRunProjectWithoutDebug ExeFile=',ExeFile);
     Process.Executable := ExeFile;
+    for i:=1 to Params.Count-1 do
+       Process.Parameters.Add(Params[i]);
     ARunMode := Project1.RunParameterOptions.GetActiveMode;
 
     if ARunMode<>nil then
Main.patch (916 bytes)

Martin Friebe

2019-06-04 11:44

manager   ~0116562

Please test and close if ok.

errno

2019-06-04 15:11

reporter   ~0116564

Ok

Issue History

Date Modified Username Field Change
2019-05-30 02:24 errno New Issue
2019-05-30 02:24 errno File Added: project1.zip
2019-05-30 02:24 errno File Added: Main.patch
2019-06-02 14:21 Martin Friebe Assigned To => Martin Friebe
2019-06-02 14:21 Martin Friebe Status new => assigned
2019-06-04 11:44 Martin Friebe Status assigned => resolved
2019-06-04 11:44 Martin Friebe Resolution open => fixed
2019-06-04 11:44 Martin Friebe Fixed in Version => 2.0.4
2019-06-04 11:44 Martin Friebe Fixed in Revision => 61318
2019-06-04 11:44 Martin Friebe LazTarget => 2.0.4
2019-06-04 11:44 Martin Friebe Widgetset Win32/Win64 =>
2019-06-04 11:44 Martin Friebe Note Added: 0116562
2019-06-04 15:11 errno Status resolved => closed
2019-06-04 15:11 errno Note Added: 0116564