Dear,

We aren't using very much the built-in debugging facility. Too much
user input is necessary. Also it can be necessary to extend your
script with additional code.
We are using most of the time our debug option of kixstrip
tool. You can easily see which lines were executed and what the kix-
tart error status was.

Shawn's example:
code:
                                            CLS
COLOR C+/N
AT (1,1) " "
IF RedirectOutput("")
ENDIF
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.04e script starting."
? "-"
? "-curdir: "+LCASE(@curdir)
? "-scriptdir: "+LCASE(@scriptdir)
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
? "-scriptname: "+LCASE(@scriptname)
ENDIF
? "-startdir: "+LCASE(@startdir)
? "-"
? "-userid: "+LCASE(@userid)+"/"+LCASE(@wuserid)
? "-user priv: "+LCASE(@priv)
IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0)
? "-version: inwin="+@inwin+"/dos="+@dos"/productsuite="+@productsuite+"/producttype="+@producttype"/csd="+LTRIM(RTRIM(@csd))
ELSE
? "-version: inwin="+@inwin+"/dos="+@dos
ENDIF
? "-"
?"- start-"+@time+"- @error @serror "?

?"- 1-"+@time+"- @error @serror "? BREAK ON
?"- 2-"+@time+"- @error @serror "?
?"- 3-"+@time+"- @error @serror "? $var = 2
?"- 4-"+@time+"- @error @serror "?
?"- 5-"+@time+"- @error @serror "? $new = Echo($var)
?"- 6-"+@time+"- @error @serror "?
?"- 7-"+@time+"- @error @serror "? ?"newvar=" $new
?"- 8-"+@time+"- @error @serror "?
?"- 9-"+@time+"- @error @serror "? EXIT 1
?"- 10-"+@time+"- @error @serror "?
?"- 11-"+@time+"- @error @serror "? FUNCTION Echo($var)
?"- 12-"+@time+"- @error @serror "?
?"- 13-"+@time+"- @error @serror "? SELECT
?"- 14-"+@time+"- @error @serror "?
?"- 15-"+@time+"- @error @serror "? CASE
$var = 1 $echo = 1
?"- 16-"+@time+"- @error @serror "? CASE
$var = 2 $echo = 2
?"- 17-"+@time+"- @error @serror "? CASE
$var = 3 $echo = 3
?"- 18-"+@time+"- @error @serror "? CASE
1 $echo = 0
?"- 19-"+@time+"- @error @serror "?
?"- 20-"+@time+"- @error @serror "? ENDSELECT
?"- 21-"+@time+"- @error @serror "?
?"- 22-"+@time+"- @error @serror "? ENDFUNCTION
?"- 23-"+@time+"- @error @serror "?

?"- end-"+@time+"- @error @serror "?
? "-"
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.04e script ending."
? "-"
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
? "-"+@cpu+" ("+@mhz+" Mhz, memory "+MemorySize()+" MB)"
ENDIF
? "-"
;($begin)
;
; wed 24-apr-2002 23:54:17 (kix 4.10 vs 3.04e)
;
;Informative KIXSTRIP: no errors found (input=23 output=23 skip=0).
;
;Informative KIXSTRIP: 2 block_structures found.
;Informative KIXSTRIP: 1 UDF found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 BREAK
;Informative KIXSTRIP: 1 ENDFUNCTION
;Informative KIXSTRIP: 1 EXIT
;Informative KIXSTRIP: 1 FUNCTION
;
;($end)

The output will be:
code:
-wednesday 2002/04/24 23:54:57- kixtart 4.02/3.04e script starting.
-
-curdir: d:\
-scriptdir:
-startdir: c:\windows
-
-userid: MCA/MCA
-user priv: guest
-version: inwin=2/dos=4.0/productsuite=/producttype=Windows 95/csd=B
-
- start-23:54:57- 0 The operation completed successfully.

- 1-23:54:57- 0 The operation completed successfully.

- 2-23:54:57- 0 The operation completed successfully.

- 3-23:54:57- 0 The operation completed successfully.

- 4-23:54:57- 0 The operation completed successfully.

- 5-23:54:57- 0 The operation completed successfully.

- 12-23:54:57- 0 The operation completed successfully.

- 13-23:54:57- 0 The operation completed successfully.

- 17-23:54:57- 0 The operation completed successfully.

- 21-23:54:57- 0 The operation completed successfully.

- 22-23:54:57- 0 The operation completed successfully.

- 6-23:54:57- 0 The operation completed successfully.

- 7-23:54:58- 0 The operation completed successfully.

newvar=2
- 8-23:54:58- 0 The operation completed successfully.

- 9-23:54:58- 0 The operation completed successfully.

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA