Debugging and the execution path
Dick Kriesel
dick.kriesel at mail.com
Wed Dec 21 19:43:27 EST 2005
On 12/21/05 2:31 PM, "Jerry Daniels" <jerry at daniels-mara.com> wrote:
> stack "save test"/button "Button"/handler "mouseUp"/line: 7
> line "7" of handler "mouseUp" of button "button" of stack "save
> test"
I guess you mean that each line in the context button's text would identify
the object whose script is executing, and each object in the long owner of
that object. So sometimes the string would be pretty long. Probably some
users would want their own preferences for long vs. abbreviated vs. short,
names vs. ids, and ascending vs. descending.
Constellation already shows handler types; some users would want to see them
in the context menu rather than just the word "handler."
With the executionContexts as it is, the finest granularity is line number.
The next level of granularity would be the character offset within the line,
which could be useful for lines that invoke a handler more than once. I
wonder whether the engine makes that level of granularity possible.
> What puzzles me is the fact that every one wanted the calling path
> when, as far as I can tell, it's already in the Rev Var Watcher. They
> call it the "execution contexts." Please tell me if I'm missing
> something.
My interest in the calling path includes not only debugging, as in the
Variable Watcher, but also use in a standalone app, where the Variable
Watcher is irrelevant.
> Conclusion: I'm not sure that the watcher I built would offer much
> new, other than the fact that it would reside in the upper two panes
> of Constellation where the props and previews sit ordinarily. I could
> make the array elements editable, I suppose.
A new variable watcher could let scripters create virtual variables, such as
"tLongNameOfTheTarget," whose values the variable watcher would derive by
evaluating an associated expression, such as "the long name of the target,"
after each breakPoint and each step. Each object in the long owner of the
script could have its own virtual variables, to be evaluated when debugging
any handler in the object's script. The names and expressions for the
virtual variables of each object could be stored in a custom property set of
the object.
I have an install-again-for-each-rev-version hack that does some of this in
the Rev Variable Watcher. If you'd like to see it, let me know. I hope
you'll extend Constellation with a new variable watcher. I'm even willing
in principle to pay an upgrade fee for it.
-- Dick
More information about the use-livecode
mailing list