Page 1 of 1

Highlight all variable values in IDE

Posted: Mon Nov 14, 2011 2:49 am
by MachineCode
I doubt this is possible, but it's always been a dream of mine. When I'm looking at a screenfull of code, I've always wish I could press and hold a hotkey, and while held, all values of all variables that are visible would appear as tooltips. Sort of like how you can hover the mouse over a single variable to pop-up its value, but a whole screenfull at once. So much easier than building watchlists and using the variable viewer. Just press and hold a hotkey -- all values pop up -- release the hotkey, they disappear again. It's sort of a "peek" feature for your code, to see what all the variables are doing. <Drool>. :lol:

Re: Highlight all variable values in IDE

Posted: Mon Nov 14, 2011 11:14 am
by Trond
A problem is, that the current feature already doesn't work perfectly (hovering a global I shows the value of a local I if that's where code execution is). This would have to get changed first, else this feature would show many misleading values.

Re: Highlight all variable values in IDE

Posted: Mon Nov 14, 2011 11:22 am
by MachineCode
Trond wrote:hovering a global I shows the value of a local I if that's where code execution is
Say what? How can a local variable exist with the same name as a global? A global is global, after all.

Re: Highlight all variable values in IDE

Posted: Mon Nov 14, 2011 11:28 am
by ts-soft
MachineCode wrote:Say what? How can a local variable exist with the same name as a global? A global is global, after all.

Code: Select all

Global test.i = 10

Procedure var()
  Protected test.i = 20
  ProcedureReturn test
EndProcedure

Debug var()
Debug test
:wink:

Re: Highlight all variable values in IDE

Posted: Mon Nov 14, 2011 11:40 am
by MachineCode
Damn the "Protected" keyword... I always forget it's the same thing as "Local" in other BASICs. Should have the same name, and while I'm griping, FindString() should be InStr() too. There, I said it! :twisted:

[Edit] And while STILL griping, any variable set as global should NOT allow a protected one to have the same name. IMNSHO. :twisted:

Re: Highlight all variable values in IDE

Posted: Mon Nov 14, 2011 2:48 pm
by Trond
An alternative explanation, without globals, is that a local MyVar in procedure A will display the value of a local MyVar in procedure B, if execution is in procedure B.