Display the value of a variable in tooltip on mouse-over

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Display the value of a variable in tooltip on mouse-over

Post by DevilDog »

It would be very helpful if we didn't have to go to the variable window to see the value of a variable.

We should have the ability much like VB has had since version 6.0 to view the value of a variable by placing the mouse over it and having it display in a tooltip.

It would be awesome if we could see the contents of a List in a "tree" format much like you see arrays in .Net. You place your mouse over the List or array and it displays in a tooltip the name of the List or array with a "+" sign next to it.

When you click the "+" sign it opens up and shows you the rows available, up to around 10 or 15 (you can scroll to see more). If the List or array is a single dimension, the value of each row is shown.

If the List or array has multiple dimensions, each row has a "+" sign next to it and you can click it and see additional "+" signs to open those elements, etc.
When all is said and done, more is said than done.
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

Isn't that a question for the "Purebasic Editor" Forum? :wink:
Windows 7 & PureBasic 4.4
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post by DevilDog »

I don't know. Isn't the debugger part of PureBasic?

Isn't this a Feature Requests and Wishlists for the entire product? Or is it compartmentalized?
When all is said and done, more is said than done.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Display the value of a variable in tooltip on mouse-over

Post by PB »

+1
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

+ another 1
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

hmmm this would make the IDE surely somewhat fatter - altho theres a debugger already in. Uhm well ok as long as jaPBe isnt broken *g*.

Not sure how you want to realize this "Tooltipness" for all platforms tho ...

Well nice feature if it doesent eat too much time away from bugfixing *G*.

But seriously whats wrong with the console debugger ? :lol:

Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> whats wrong with the console debugger ?

Nothing, but if you've used this idea with VB you'll know how good it is. :)
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

i was kidding :)

on that note tho .. together with the step by step debugger ( maybe timeable ) a currentline mark with realtime variable view on mouse over sounds comfortable :)

Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
Godai
Enthusiast
Enthusiast
Posts: 171
Joined: Thu Oct 05, 2006 8:13 pm

Post by Godai »

+1 - Watching variables is very bad. You even have to select the function it's in. Much easier with the tooltip and would bring debugger up to par with pro C#/Java/C++ solutions. One of the largest weaknesses with these otherwise great basic implementations (Blitz, Pure etc.) is that the debugger is much worse than Visual C++/C# and Netbeans for instance.
This makes debugging slower/worse and leads to more bugs and less debugging ;)
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Looking up a variable value like this should not be too hard to implement.
I put it on my list for the 4.20 version.
Godai wrote:One of the largest weaknesses with these otherwise great basic implementations (Blitz, Pure etc.) is that the debugger is much worse than Visual C++/C# and Netbeans for instance.
This makes debugging slower/worse and leads to more bugs and less debugging ;)
Bring on the ideas then. I want to know anything you are missing!
I must say i do not have that much experience with debuggers of other products,
so please enlighten me and i will see what can be done.

Debugging is the most annoying part of programming (next to docs writing maybe),
so it should be made as easy and comfortable as possible... :)
quidquid Latine dictum sit altum videtur
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

freak wrote:Debugging is the most annoying part of programming (next to docs writing maybe),
so it should be made as easy and comfortable as possible... :)
I am absolutely agree in that point.
Anyway, currently the PB debugger is nice enough.
But new ideas in order to make easier the debugging tasks would be awesome, over all if they are original (not viewed before in any other compiler) :wink:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Godai
Enthusiast
Enthusiast
Posts: 171
Joined: Thu Oct 05, 2006 8:13 pm

Post by Godai »

Actually I think PB has one of the better debuggers :)
You should be able to add global watches as it is now, although it should automatically show the value for the current function the debugger is in and then just show ### or something when the variable is not in scope.
Also, it should automatically show values in scope for the current function (local variables). If you want to watch globals, you should add them yourself to keep the view unclogged.
That would make it almost or just as good as the legendary Visual C++ debugger :)
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post by DevilDog »

Bring on the ideas then. I want to know anything you are missing!
I think overall the debugger is pretty good and would be awesome with the variable viewing feature in a tooltip which is being discussed.

Also, would it be possible to display the values of an array in the debugger when you place the mouse over the array name in a "tooltip" like this:

In the "tooltip" you would display the name of the array with a "+" next to it. Then when you click the "+" sign you could display the values of the array in a "tree" like fashion?

It's the way array values are displayed in .Net and it's very convenient and helpful in debugging.

Another cool feature to add:

In the debugger when stepping through the code if it's possible to click on the left border of the debugger (where the line numbers are shown) to mark a line you wish to stop on in place of using the F9 key would be great.

Thanks!
When all is said and done, more is said than done.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

DevilDog wrote:In the debugger when stepping through the code if it's possible to click on the left border of the debugger (where the line numbers are shown) to mark a line you wish to stop on in place of using the F9 key would be great.
This is supposed to work already:
Holding down ALT while clicking places a breakpoint
Holding down CTRL while clicking places a jump marker

Its not working in the last beta though... i have to check out whats wrong there.


[Edit]
Actually, it is working, but not in the standalone debugger.
In the IDE, clicking on the margin with the folding marks etc (not the linenumbers)
while holding down ALT will place a breakpoint.
quidquid Latine dictum sit altum videtur
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Two suggestions for the tooltips for variables:

(1) Make the tooltip delay shorter (500ms?) because 1000ms is too long.

(2) Don't make it show the variable name or put quotes around the value.
Because there is only X amount of characters that it shows, and for long
strings I can't always see the whole amount because my variable name is
long and the tooltip is wasting lots of characters on displaying it. The user
has put the mouse over the name so we don't really need it in the tooltip.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply