NO

Author Topic: application command line while debugging not parsed correctly  (Read 4194 times)

Gravity

  • Guest
When running an application with the following command line argument, through the debugger,

$SYS/broker/bytes/received

the "$S" (i.e the first two chars) is stripped off.

When running the application from the command line it works fine.

This is with

Version 7.00.3 RC 2 Win64

Gravity

  • Guest
Re: application command line while debugging not parsed correctly
« Reply #1 on: May 05, 2012, 09:15:34 PM »
Actually,

I just found that if one uses

$$SYS it works.

czerny

  • Guest
Re: application command line while debugging not parsed correctly
« Reply #2 on: May 06, 2012, 07:38:06 PM »
I had posted my problems with commandline in ver 6.5 in
http://forum.pellesc.de/index.php?topic=4038.msg14788#msg14788.
Yours seem to be a parsing problem too. $x looks like a commandline prompt code, where $$ is a $ sign himself, $T the time, $D the date and so on.

czerny
« Last Edit: May 09, 2012, 10:55:11 PM by czerny »

CommonTater

  • Guest
Re: application command line while debugging not parsed correctly
« Reply #3 on: May 06, 2012, 07:56:24 PM »
@Graity ...  I think we need a little more information...

It would be helpful if you would post
1) *Exactly* what is being typed at the command line (program name, quotes, etc...)
2) The project command line settings for your debug run... (a screen cap should do)

Then...
Does it work from the command line?
What does this represent... a file?

 

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: application command line while debugging not parsed correctly
« Reply #4 on: May 06, 2012, 08:27:37 PM »
This code shows problem with Command line arguments:
$SYS/broker/bytes/received
Code: [Select]
#include <stdio.h>

int main(int argc, char **argv)
{
for (int i=0; i<argc;i++)
printf("%u: %s\n", i, argv[i]);
return 0;
}
Code: [Select]
0: C:\CODE\PellesC\Forum\cmdlineparams.exe
1: YS/broker/bytes/received
Press any key to continue...
May the source be with you

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: application command line while debugging not parsed correctly
« Reply #5 on: May 15, 2012, 04:20:21 PM »
The command line passes through the project macro expander, where common macros are like $(NAME) - but can also be as simple as $N (a single letter, like in POMAKE). In this case $S is taken as a reference to macro S, which doesn't exist (probably) and is replaced with an empty value. $$ can be used for a literal $.

Not a bug, but the documentation could probably be better...
/Pelle

czerny

  • Guest
Re: application command line while debugging not parsed correctly
« Reply #6 on: May 15, 2012, 07:30:36 PM »
This explains not the misbehaviour I observed. Should I post my command line problem here as a separate bug?

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: application command line while debugging not parsed correctly
« Reply #7 on: May 16, 2012, 09:40:42 AM »
This explains not the misbehaviour I observed. Should I post my command line problem here as a separate bug?
I think to handle two or more (even similar) problems in one task, has best conditions that some aspects are overlooked.
So I prefer for me to put every problem in an own task and so you can easily track whether a problem is solved or not.
best regards
 Alex ;)