22 Votes

Delphi: Command Line Parameters within the IDE?

Question by Guest | Last update on 2026-12-01 | Created on 2012-10-22

I'm working on a program that is operable with parameters via the command line. The development, however, proves to be extremely complicated and time consuming, because again and again, I have to run the program from the command line after compiling, rather than testing the program directly out of the Delphi IDE.

Are there any ways to pass parameters directly in the Delphi IDE to run and use the application? This would make it much more easier.

ReplyPositiveNegative
2Best Answer2 Votes

It is possible - you can set the parameters directly from the IDE:

  • Just go to "Run > Parameters" via the menu of the IDE in Delphi
  • In Lazarus, the function can be found in the menu "Run > Run Parameters"

In the field appearing in the dialog window, you can just write the parameters as you would also type them into the command line.

So, for example, "param1 param2" to pass "param1" and "param2" to the program.

If you have set this, the program will start with these parameters directly after compiling automatically. The parameters are not stored in the EXE, so that the program itself remains identical to a program compiled without this settings.
Last update on 2026-12-01 | Created on 2012-10-23

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.