In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Feeding command line parameters while debugging

Xailer professional forum in English
Responder
Guest

Feeding command line parameters while debugging

Mensaje por Guest »

Who do you set up automatic command line parameters while in debug mode?
For example, if the main function is
Function Substitution( nTheoremToApply, cDetailedAnnotation,
cApplySymmetry, cVariables )
....
....
Return NIL
,
How do you instruct the debugger to assume that (e.g.)
nTheoremToApply := 3
cDetailedAnnotation := "A"
cApplySymmetry := "S"
cVariables := "p,q,r"
?
There is no problem accessing the variables in non-debugging runtime,
since they can be supplied by the GUI or by the actual command line. I
just need to know how to persuade the debugger that these are the
initial values.
NoAccount
Mensajes: 35
Registrado: Mié Sep 16, 2009 10:09 am

Feeding command line parameters while debugging

Mensaje por NoAccount »

DC,
I am not sure that I understood your question. BTW, you can use the function
IsDebug() to know if you are running under the debugger. I hope it helps.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer team
http://www.xailer.com
http://www.xailer.info
"DC" <NoSpamPlease@nycap.rr.com> escribió en el mensaje
news:[email=4ba27581@svctag-j7w3v3j....]4ba27581@svctag-j7w3v3j....[/email]
> Who do you set up automatic command line parameters while in debug mode?
>
>
> For example, if the main function is
>
> Function Substitution( nTheoremToApply, cDetailedAnnotation,
> cApplySymmetry, cVariables )
>
> ...
> ...
>
> Return NIL
>
>
> ,
>
> How do you instruct the debugger to assume that (e.g.)
>
>
> nTheoremToApply := 3
> cDetailedAnnotation := "A"
> cApplySymmetry := "S"
> cVariables := "p,q,r"
>
>
> ?
>
> There is no problem accessing the variables in non-debugging runtime,
> since they can be supplied by the GUI or by the actual command line. I
> just need to know how to persuade the debugger that these are the initial
> values.
>
NoAccount
Mensajes: 35
Registrado: Mié Sep 16, 2009 10:09 am

Feeding command line parameters while debugging

Mensaje por NoAccount »

DC,
I am not sure that I understood your question. BTW, you can use the function
IsDebug() to know if you are running under the debugger. I hope it helps.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer team
http://www.xailer.com
http://www.xailer.info
"DC" <NoSpamPlease@nycap.rr.com> escribió en el mensaje
news:[email=4ba27581@svctag-j7w3v3j....]4ba27581@svctag-j7w3v3j....[/email]
> Who do you set up automatic command line parameters while in debug mode?
>
>
> For example, if the main function is
>
> Function Substitution( nTheoremToApply, cDetailedAnnotation,
> cApplySymmetry, cVariables )
>
> ...
> ...
>
> Return NIL
>
>
> ,
>
> How do you instruct the debugger to assume that (e.g.)
>
>
> nTheoremToApply := 3
> cDetailedAnnotation := "A"
> cApplySymmetry := "S"
> cVariables := "p,q,r"
>
>
> ?
>
> There is no problem accessing the variables in non-debugging runtime,
> since they can be supplied by the GUI or by the actual command line. I
> just need to know how to persuade the debugger that these are the initial
> values.
>
Guest

Feeding command line parameters while debugging

Mensaje por Guest »

>>I am not sure that I understood your question.<<
In Visual Studio (I stopped working in VS a couple of years ago), as
well as Intellij IDEA, you can specify a set of default parameters for
debugging purposes. These parameters act - pretend - as if they came
from the command line.
>>BTW, you can use the function IsDebug() to know if you are running
under the debugger. I hope it helps.<<
Yes, that can be used to do a workaround. The default assignments can
be made only if IsDebug() is true, thus:
// If in debugger, default the command line parameters
If IsDebug()
nTheoremToApply := 3
cDetailedAnnotation := "A"
cApplySymmetry := "S"
cVariables := "p,q,r"
// If in development, validate command line parameters
Else
If !ValidateCmdPars( nTheoremToApply,;
cDetailedAnnotation,;
cApplySymmetry,;
cVariables;
)
DispError_and_Quit()
Endif
Endif
Something like that should do the trick, ok thanks Ignacio.
Regards,
DC
Guest

Feeding command line parameters while debugging

Mensaje por Guest »

>>I am not sure that I understood your question.<<
In Visual Studio (I stopped working in VS a couple of years ago), as
well as Intellij IDEA, you can specify a set of default parameters for
debugging purposes. These parameters act - pretend - as if they came
from the command line.
>>BTW, you can use the function IsDebug() to know if you are running
under the debugger. I hope it helps.<<
Yes, that can be used to do a workaround. The default assignments can
be made only if IsDebug() is true, thus:
// If in debugger, default the command line parameters
If IsDebug()
nTheoremToApply := 3
cDetailedAnnotation := "A"
cApplySymmetry := "S"
cVariables := "p,q,r"
// If in development, validate command line parameters
Else
If !ValidateCmdPars( nTheoremToApply,;
cDetailedAnnotation,;
cApplySymmetry,;
cVariables;
)
DispError_and_Quit()
Endif
Endif
Something like that should do the trick, ok thanks Ignacio.
Regards,
DC
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Feeding command line parameters while debugging

Mensaje por jfgimenez »

DC,
> In Visual Studio (I stopped working in VS a couple of years ago), as
> well as Intellij IDEA, you can specify a set of default parameters for
> debugging purposes. These parameters act - pretend - as if they came
> from the command line.
You may set them by using the menu option "Run" > "Parameters..."
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Feeding command line parameters while debugging

Mensaje por jfgimenez »

DC,
> In Visual Studio (I stopped working in VS a couple of years ago), as
> well as Intellij IDEA, you can specify a set of default parameters for
> debugging purposes. These parameters act - pretend - as if they came
> from the command line.
You may set them by using the menu option "Run" > "Parameters..."
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Guest

Feeding command line parameters while debugging

Mensaje por Guest »

>>You may set them by using the menu option "Run" > "Parameters..." <<
Yep, I see it, thanks Jose.
Regards,
DC
Guest

Feeding command line parameters while debugging

Mensaje por Guest »

>>You may set them by using the menu option "Run" > "Parameters..." <<
Yep, I see it, thanks Jose.
Regards,
DC
Responder