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 

Specify input for debugging

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



Joined: 30 Dec 2013
Posts: 12

PostPosted: Fri Jan 15, 2016 7:28 pm    Post subject: Specify input for debugging Reply with quote

My application runs from the command line like this: MYAPP.exe IFILE, where IFILE is the path\name of the input file for this run. A legitimate IFILE is required; if it is missing, MYAPP prints an informative error message and STOPs. I would now like to run MYAPP from the IDE, specifically from the Silverfrost debugger.

How do I specify IFILE's name when I am debugging MYAPP.
_________________
Stan Musick
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 553
Location: UK

PostPosted: Fri Jan 15, 2016 9:53 pm    Post subject: Reply with quote

In the Plato IDE pick Project, then Properties ...
Click the Miscellaneous category.
Click Launch arguments and type the command line arguments in and click apply.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
stan39



Joined: 30 Dec 2013
Posts: 12

PostPosted: Sat Jan 16, 2016 4:08 am    Post subject: Specify input for debugging Reply with quote

The names of things are slightly different for the Microsoft IDE, but I found it OK and it should work. That had me very frustrated.
Thanks so much!
_________________
Stan Musick
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1971
Location: Sydney

PostPosted: Sat Jan 16, 2016 12:06 pm    Post subject: Reply with quote

Stan,

If you run the following example in Plato, as a project it may help. I set the launch arguments under project > properties >miscellaneous as: "aa /b/c file_name" and it reported as expected.
Code:
 Program get_run_options
!
      character option*128
      integer*4 i, num, iostat
!
      i = 0
      do
         option = ' '
         num    = 0
         call get_command_argument (i, option, num, iostat)
         write (*,111) 'get_command_argument ',i,' : ',trim(option), num, iostat
         if (iostat /= 0 .and. i > 0) exit
         i = i+1
      end do
  111 format (a,i0,a,a,1x,i0,1x,i0)
!
  end Program get_run_options
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Jan 16, 2016 2:20 pm    Post subject: Reply with quote

When running the debugger SDBG from a command line, you should provide the name of the executable file first then /params (or /p) and then the command line arguments for the executable.
Back to top
View user's profile Send private message
stan39



Joined: 30 Dec 2013
Posts: 12

PostPosted: Tue Jan 19, 2016 6:40 pm    Post subject: Specify input for debugging Reply with quote

Thanks to all of you.
I've been using the debugger very successfully since the very first response from y'all.
Going forward, I'll fuss a little less with the Forum's archive in favor of posting my query a little earlier.
_________________
Stan Musick
Back to top
View user's profile Send private message
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