1 (edited by davidb 2013-09-22 11:32:11)

Topic: Launch command line arguments ignored when debugging

One of my Programs uses command line arguments which I read using COMMAND_ARGUMENT_COUNT and GET_COMMAND_ARGUMENT (Both F2003 intrinsics).

I enter the command line arguments in the Launch ... dialog accessed from the Options menu.

This works for normal running, but when i am debugging, the debugger doesn't "see" the command line and COMMAND_ARGUMENT_COUNT returns 0.

Can this be fixed? At the moment I cannot debug if my Program uses command line arguments.

(Using v. 2.2)

Here's something I can't debug:

PROGRAM HELLO_NAME
   INTEGER :: N
   CHARACTER(LEN=100) :: NAME
   N=COMMAND_ARGUMENT_COUNT()
   IF (N > 0) THEN
      ! Get first argument, assume its a name
      CALL GET_COMMAND_ARGUMENT(1, NAME)
      PRINT *, "HELLO ", TRIM(NAME)
   ELSE
      PRINT *,"HELLO WORLD"
   END IF
END PROGRAM HELLO_NAME
--
David

Re: Launch command line arguments ignored when debugging

David,

That should not be happening.  I look into what's going on.

Jeff Armstrong
Approximatrix, LLC

Re: Launch command line arguments ignored when debugging

It looks like passing launch arguments to the debugging process broke during the transition to 2.0 at some point.  I've fixed the issue, and it should be working fine again when version 2.3 is released.

Jeff Armstrong
Approximatrix, LLC

Re: Launch command line arguments ignored when debugging

Thank you.

--
David

Re: Launch command line arguments ignored when debugging

This works now in version 2.3.

--
David