Re: A History of Variables

  • From: Andreas Stefik <stefika@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Wed, 14 Oct 2009 10:50:39 -0500

Rodney,

Well does your debugger have a window that shows all of the current
> variables that are in scope?  I know you mentioned the watch window, but I
> assume that is only watching variables that you identify.
>

Yes, it has such a window. I must have mis-spoke, we actually have the
opposite right now, it shows only those variables in scope, we do not have
the self identified variables yet (e.g., watch window). I suppose our window
would really be called a local variables window. Eventually, this window
will be combined with a watch window, just like in NetBeans (but with
history), although we haven't finished that yet. We want to get the history
stuff in there first, as the watch window actually requires some extra
parsing routines. It's not hard, but it is time consuming.

That's why we're asking for ideas about history, at least. We've been
batting around a number of designs, but haven't quite coalesced on one we
find really hip, yet.



> If there is a window that shows all variables in scope, then I would
> suggest spawning from this window.
> Alex had a great suggestion on the resulting user interface from a
> keypress.  That interface could be called by pressing enter on the variable
> in the list.
>

Sounds good, I'll put another vote for this type of interface in place.



> Of course this would work only for variables that are currently in scope.
> Are there situations where you would want to see variables that no longer
> exist?
> -Rodney
>
>
Yes, there are actually. Lets take what is, by far, the most trivial example
I can think of. Suppose you had the following code in our language:

integer a = 5
a = 10
a = 15



You then run the debugger to the third line (a = 15), but do not execute it.
In our variables history window, you can get at any old values of that
value: a, which in this case would be only 5. The current value is 10.
Similarly, if you stepped over a = 15, you could get 15, 10, and 5.

Now, it gets much more complicated once you add in custom functions, scopes,
objects, packages, and whatever else, but that's the very basic idea. And of
course, all of this is designed with auditory feedback as the debugger
executes. In this case, our debugger would say, as you step over, the
following:

a to 5
a to 10
a to 15

Anyway, that's the idea.

Stefik

Other related posts: