A user may want to add a particular variable or expression to the Visual Foxpro debug watch window
Here’s some code to do it.
The debugger can read/write a particular debug config file. The default is stored in the fox resource file. Or you can choose File->Save Configuration to save various configurations.
Try saving a config file and examining it to see the various options available.
This code assumes that you already have a FOXUSER record for WATCHEXPR.
TEXT TO myvar
USE SET("Resource",1) AGAIN SHARED
LOCATE FOR id="WATCHEXPR" AND !DELETED()
REPLACE data WITH CHR(4)+CHR(0)+myvar,ckval WITH VAL(SYS(2007,myvar))
ACTIVATE WINDOW watch