Pelles C forum

C language => Beginner questions => Topic started by: PabloMack on March 14, 2019, 01:15:32 AM

Title: How do I pass command line arguments to a program that is being debugged?
Post by: PabloMack on March 14, 2019, 01:15:32 AM
For instance, my program is run with the command line:

E:> MyProgram File.Nam<CR>

How would I pass "File.Nam" to the debugger so it can hand it to my program so it can find it with argc and argv?
Title: Re: How do I pass command line arguments to a program that is being debugged?
Post by: DMac on March 14, 2019, 05:22:19 AM
From the IDE menu bar select "Project>Project Options...>General Tab>Command line arguments"
Title: Re: How do I pass command line arguments to a program that is being debugged?
Post by: PabloMack on March 14, 2019, 05:19:40 PM
When the debugger is active, the Project Options is grayed out. I guess that you have to enter the command line options where you say just in case you are going to use the debugger because by the time you run the debugger, the entry is already in use so it is too late at that point? Thanks for the answer.