View previous topic :: View next topic |
Author |
Message |
stan39
Joined: 30 Dec 2013 Posts: 12
|
Posted: Fri Jan 15, 2016 7:28 pm Post subject: Specify input for debugging |
|
|
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 |
|
|
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Fri Jan 15, 2016 9:53 pm Post subject: |
|
|
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 |
|
|
stan39
Joined: 30 Dec 2013 Posts: 12
|
Posted: Sat Jan 16, 2016 4:08 am Post subject: Specify input for debugging |
|
|
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 |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Sat Jan 16, 2016 12:06 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Jan 16, 2016 2:20 pm Post subject: |
|
|
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 |
|
|
stan39
Joined: 30 Dec 2013 Posts: 12
|
Posted: Tue Jan 19, 2016 6:40 pm Post subject: Specify input for debugging |
|
|
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 |
|
|
|