
Highlight all variable values in IDE
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Highlight all variable values in IDE
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>. 

Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: Highlight all variable values in IDE
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.
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: Highlight all variable values in IDE
Say what? How can a local variable exist with the same name as a global? A global is global, after all.Trond wrote:hovering a global I shows the value of a local I if that's where code execution is
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: Highlight all variable values in IDE
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

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: Highlight all variable values in IDE
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! 
[Edit] And while STILL griping, any variable set as global should NOT allow a protected one to have the same name. IMNSHO.

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

Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: Highlight all variable values in IDE
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.