variable monitor? Is there one?

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 16 05:11:49 CEST 2013


On 10/15/13 6:48 PM, prothero at earthednet.org wrote:
> I'm wondering if there is a way to monitor a variable while the code
> is running. I have a cursor that won't stay set to my custom cursor,
> and I can't find where it is getting unlocked. I'm using 6.1.2.

Since the cursor isn't really a variable, I think your best option is to 
use Find and Replace (Edit menu) to look for all instances of "cursor" 
in all the scripts.

It's possible to set a global variable watch, but I don't think it will 
work with built-in functions like the cursor unless you're setting the 
cursor to the value of a variable you've defined. Then you could watch 
that variable.

If that's what you're doing, to automatically break into the script 
editor when a variable changes:

Place the cursor in a line of script that contains the variable you want 
to watch.
Go to the Breakpoint pane in the variable watcher.
Right-click and choose "New Watch"
The handler you're in should be selected in the Handler popdown; or you 
can choose a different one.
Choose the variable you want to watch from the Variable popdown.
Set a condition if you want, or leave it blank. Leaving it blank causes 
a break whenever the variable changes in any way. Adding a condition 
will break only if that condition is true.
Click OK.

Start browsing through the stack, doing actions that cause the watched 
variable to change. When it changes (or meets a condition you've set,) 
the script will break.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list