Show pointers in variable viewer

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Show pointers in variable viewer

Post by Trond »

Structured pointers can be examined by hover the mouse over them in the IDE. But it's cumbersome, and for big structures, not all members fit in the tooltip. So please add this feature to the variable viewer, too.
User avatar
idle
Always Here
Always Here
Posts: 5844
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Show pointers in variable viewer

Post by idle »

+1
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Show pointers in variable viewer

Post by skywalk »

Hey, just came across this problem with a pointer based structured array.
The variable viewer only lists the *pointer but not the *pointer.StructureName?
So I cannot expand the contents. :(
But, when I tabbed over to the View Array/List/Map tab and manually entered:
*pointer\myarray() and clicked the [Display] button to the right...
Voila! All the structured array elements were expanded. 8)
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Show pointers in variable viewer

Post by Demivec »

skywalk wrote:But, when I tabbed over to the View Array/List/Map tab and manually entered:
*pointer\myarray() and clicked the [Display] button to the right...
Voila! All the structured array elements were expanded. 8)
Great detective work! :D
User avatar
IceSoft
Addict
Addict
Posts: 1690
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Show pointers in variable viewer

Post by IceSoft »

Demivec wrote:
skywalk wrote:But, when I tabbed over to the View Array/List/Map tab and manually entered:
*pointer\myarray() and clicked the [Display] button to the right...
Voila! All the structured array elements were expanded. 8)
Great detective work! :D
Seems to be more a BUG as a feature request?
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Show pointers in variable viewer

Post by Demivec »

IceSoft wrote:
Demivec wrote:
skywalk wrote:But, when I tabbed over to the View Array/List/Map tab and manually entered:
*pointer\myarray() and clicked the [Display] button to the right...
Voila! All the structured array elements were expanded. 8)
Great detective work! :D
Seems to be more a BUG as a feature request?
I would think that it was an undocumented feature.
Franky
Enthusiast
Enthusiast
Posts: 213
Joined: Sat Apr 26, 2003 2:58 pm

Re: Show pointers in variable viewer

Post by Franky »

1.) +1
2.) I'd liked to have it the other way around, too.
If you have a structure that can be expanded, why not show the Adress of that Structure on Column "Value" which for the moment is empty
Additionally, a search for Pointers would be good.

What I Mean:
Imagine this:

Code: Select all

Structure s_Four
  Wert.l
  text.s
EndStructure

Structure s_Three
       List Things.l()
EndStructure

Structure s_Two
  Map Words.s_Three()
EndStructure 

Structure s_One
   Array More.s_two(14)
EndStructure

Global MeinWert.s_One



Procedure GimmeThree(*_TThree.s_Three)
 ForEach *_TThree\Things()
   If *_TThree\Things()\wert=15
     Debug *_TThree\Things()\text
     CallDebugger
     Break
   EndIf
 Next
EndProcedure

Procedure GimmeTwo(*_TTwo.s_Two)
  ForEach *_TTwo\Words()
    Debug MapKey(*_TTwo\Words())
    GimmeThree(*_TTwo\Words())
  Next
EndProcedure

Procedure GimmeOne(*_TOne.s_One)
  Debug ArraySize(*_TOne\More())
  For a=0 To ArraySize(*_TOne\More())
    GimmeTwo(*_TOne\More(a))
  Next
EndProcedure


.... AddAnyData To  MeinWert

GimmeOne(MeinWert)
Just a simple nested Data Structure.
Now, imagine you reach Calldebugger.
Today, there's no way to find out, which element it is.
With a display of the Pointer adress for structured Variables, we could take the Pointer to the watchlist, than start the variable Viewer and compare each elements adress with the one the pointer has.
A search could do this automatically, because PB has all the information it needs for that.


So my wish is 3 wishes.

1.)Show Pointers in VariableViewer (and make the structure Readable)
2.)Show Pointer Adresses for structured Variables
3.)Add a search function or a possibility that we could add that on our own.


Thanks for reading, asking, understanding and implementing

Greetings

Franky
Give Up everything but trying!
Post Reply