How do I debug PROGRAM written in LANGUAGE ANYFLO

Interpreter
Debug
Debug under Windows
Debug under UNIX

















































Interpreter

Functions written in anyflo language are dynamically compiled. In order to verify their execution you can set print and input, it is then possible to consult or change any variables, execute any function and, more generally, execut any commande.
You can also run any function independently of the main function.

func error returne the name of the function where an error occured.

Function bug1.func gives a frame for debuging.
Tags:
       /* AJOUTER du code */
and
       /* FIN AJOUTER du code */
delimit areas where it is possible to add code, while tags:
       /* NE PAS MODIFIER */
and
       /* FIN NE PAS MODIFIER */
delimit unmodifiable areas .
A minimal menu containing:
Two boxes APP1 and APP2 corresponding to the functions APP1(), func_APP1(), APP2(), func_APP2() in which you write the code to debug.
A box DEBUG corresponding to functions DEBUG(), func_DEBUG() allowing to interactively modify extern variables Vi (0 <= i <= 23) by the command interaction debug.
A box VAR corresponding to functions VAR(), func_VAR() in which these variables can be used.

2) When launching anyflo with a file *.js, in case of error it automatically restarts, so it is not possible to make a diagnosis.
Then launche anyflo with file anyflo_video.js, read the function to debug and call it.
If the compilation error messages sent can make the diagnosis, the edit func command gives the list of func functions compiled without error, the following is probably faulty ...
Otherwise, call the function to debug, error messages relating to the execution can make the diagnosis.















































Debug

Commande yes debug activates debug mode, interpreter is invoked before executing each instruction, it is then possible to consult or change any variables, execute any function and, more generally, execut any commande..

Continuation

         1) continuation Key can be changed in file enva.h (escape ASCII code 27 by default).
         2) Edited at programme launching.
         3) Command debug ascii:
debug ascii: return the key continuation (27=escape by default).
debug ascii("c"): set c key to continuation key.
Examples:
$(debug) ascii: gives 27.
debug ascii("`"): changes the key continuation into grave accent.

Pratically

         Invokes commande
yes debug.
quitte debug mode with no debug.
         Le propmtbecomes DEBUG>
         Press key continuation then ENTER
         Prompt becomes again ?
         Write a command (for example a function to debug)
         The name of the function, the number of the line to drebug and tej text le text of this line are edited
         The interpreter waits: we can execute any command
         The continuation key followed by ENTER continue.

debugger commands

Avancer

         1) The continuation key foillowed by ENTER continue
         2) no debug;, followed by the continuation key and ENTER abandonnes the debugger mode
         3) GO executes until next break

Points d´arrêt

         1) STOP num sets a break point line number num of the function
         2) STOP "toto" sets a break point to function toto
         3) STOP "toto",num stes a break point at line number num of function toto
         4) edit STOP edits the STOPs
         5) rem STOP num deletes STOP num
         6) rem STOP "toto" deletes STOP "toto"
         7) rem STOP "toto",num deletes STOP "toto",num
         8) ini STOP deletes all of the STOPs

Lister

         1) LIST edites 20 lines after the instruction
         2) LIST n edites line number n of function
         3) LIST n1,n2 edites lines lignes n1 to n2 of function
         4) LIST "toto" edites function toto
         5) LIST "toto",n edites line number n of function toto
         6) LIST "toto",n1,n2 edites lines n1 to n2 of function toto

Debugger sous windows (Visual C++)

Launche programme with debug option (see la doc du VisualC++).
sets a break to line if(i) after line i = 0; /* Break debug */ of function inita of file inita.c, then assignes 1 to variable i.
messages Rentrer une suite d'options, terminer par .
enter options one after other
enter . (point)


UNDER IMPLEMENTATION

Debugger sous dbx(UNIX)

         Lancer le programme sous dbx:
         dbx anyflo
         >run
         Exécuter des fonctions
         ^C interromp le traîtement
         >assign Debug=1
         >c
         À l´exécution d´une commande l´interpreteur a la main avec le prompt:
         DEBUG>
         N´importe quelle line de commandes peut être exécutée