Debugging and the execution path
graham.samuel at wanadoo.fr
Sun Dec 18 12:32:16 EST 2005
On Sat, 17 Dec 2005 21:41:32 +0000, Alex Tweedly <alex at tweedly.net>
> graham samuel wrote:
>> On Sat, 17 Dec 2005 16:49:19 +0000, Alex Tweedly <alex at tweedly.net>
>>> In the Variable Watcher, just to the right of the drop-down menu of
>>> objects/contexts, there is a button like a scroll of paper.
>>> Clicking on
>>> that will take you to the script line of the currently selected
>>> Also, in the script editor, you can use the menu View / Go to
>>> line ...
>>> to go to a line number. Unfortunately, you can't do that while in
>>> debugger mode - the whole View menu is not enabled at that point.
>> So that means that the debugger telling me that I was executing line
>> 437 in a certain script is kind of unhelpful, unless I choose to
>> count the lines when not in debugger mode, or unless the jumping-off
>> point in the calling script is obvious for example because it's the
>> only call to a particular handler (which would make the need to
>> identify line 437 redundant).
> No - you can click on the "scroll of paper" button in the VW window
> it will move to that line in the script editor window.
Not here it doesn't (RR 2.6.1 build 152 on Tiger): the cursor appears
to go to an arbitrary line in the script shown. I have for example a
script of a button where the Variable Watcher reports that execution
was at line 9, but the cursor shows a much later line - even if I
don't count the comment lines (should I?), I can't equate the cursor
with line 9. But far more importantly, it's easy to show that the
execution can't have branched from the line where the cursor is -
indeed in one case the cursor is on a line with a comment, and in
another, the cursor isn't set... I'd be happier if I could find some
official documentation for all this. I sure hope there is some, not
only for my sake but for the sake of all those new to RR.
> Or, if you have already figured out what the problem is, then you can
> click on "Abort", and then you have "Go to line" available again.
Yep, but I would have had to write down all the line numbers (I might
be six deep in the execution path, or more) which seems against the
spirit of an online debugger.
thanks as ever for the info
Graham Samuel / The Living Fossil Co. / UK and France
More information about the Use-livecode