forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

debugging and command line arguments

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
brucebowler
Guest





PostPosted: Wed May 17, 2006 7:28 am    Post subject: debugging and command line arguments Reply with quote

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: 7916
Location: Salford, UK

PostPosted: Thu May 18, 2006 1:43 am    Post subject: debugging and command line arguments Reply with quote

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
View user's profile Send private message AIM Address
brucebowler
Guest





PostPosted: Thu May 18, 2006 8:22 am    Post subject: debugging and command line arguments Reply with quote

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: 7916
Location: Salford, UK

PostPosted: Thu May 18, 2006 9:27 am    Post subject: debugging and command line arguments Reply with quote

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
View user's profile Send private message AIM Address
brucebowler
Guest





PostPosted: Thu May 18, 2006 10:20 am    Post subject: debugging and command line arguments Reply with quote

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 Smile.
Back to top
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri May 19, 2006 9:56 am    Post subject: debugging and command line arguments Reply with quote

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
View user's profile Send private message AIM Address
brucebowler
Guest





PostPosted: Fri May 19, 2006 11:36 am    Post subject: debugging and command line arguments Reply with quote

Thanks!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group