View previous topic :: View next topic |
Author |
Message |
brucebowler Guest
|
Posted: Wed May 17, 2006 7:28 am Post subject: debugging and command line arguments |
|
|
I'm sure it's obvious and I just missed it, but when running in the debugger from within plate (hmmm, maybe this should be in the plato forum instead), how do I pass command line parameters to the program being debugged? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Thu May 18, 2006 1:43 am Post subject: debugging and command line arguments |
|
|
Bruce
If you have a project open, open the project properties dialog, select Compiler Options->Miscellaneous->Launch arguments, and type the arguments into the Params box.
If you do not have a project open you can create a command from the Tools menu.
It could be something like
SDBG %p /p <runtime args>
You can add %u and put variable parameters in the Tools "Command line options". |
|
Back to top |
|
|
brucebowler Guest
|
Posted: Thu May 18, 2006 8:22 am Post subject: debugging and command line arguments |
|
|
Paul,
Thanks, but the first solution causes the problem I was trying to avoid... It causes a mass recompilation if I change the launch arguments.
The second doesn't work as it tries to run c:pathtosourceprogram.f95.exe which isn't the name of the executable.
I've worked around the problem by adding some code that checks length and status from get_command_arguments and sets defaults that way (so only one routine needs to be recompiled, as opposed to everything). A pain, but it works...
Thanks!
Bruce |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Thu May 18, 2006 9:27 am Post subject: debugging and command line arguments |
|
|
Bruce
I only made a guess when suggesting %p. I was hoping that you would look this up in the help file.
Perhaps %d%f.exe is better.
You can stop the automatic recompilation by selecting an option in the Options dialog box.
Then when you are prompted to compile you can select No.
|
|
Back to top |
|
|
brucebowler Guest
|
Posted: Thu May 18, 2006 10:20 am Post subject: debugging and command line arguments |
|
|
I suppose I should have indicated I tried that. %d%f, doesn't work, because the exe is in a "configuration and platform of build" specific directory. You need to use %dcheckmatewin32%f. That is, until you change it from a win32 platform to a .net platform or from a checkmate configuration to debug or release configuration, then you need to change the location as appropriate.
Perhaps in a future version, there could be a %t that is the "target of the build", which would work in all cases (note I didn't check if %t is already used, that's just a suggestion . |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri May 19, 2006 9:56 am Post subject: debugging and command line arguments |
|
|
Bruce
I have added %t (for projects) and I have also made the cleaning process (after changing the project properties) much more intelligent. Now there is no automatic Clean when changing options such as the Launch parameters and only a link is required when the linker options are changed. |
|
Back to top |
|
|
brucebowler Guest
|
Posted: Fri May 19, 2006 11:36 am Post subject: debugging and command line arguments |
|
|
Thanks! |
|
Back to top |
|
|
|