Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-02

New feature in 1.3 - Click through to members in Debug inspector

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Frb

http://wiki.lazarus.freepascal.org/IDE_Window:_Variable_Inspector

Lazarus 1.3 only:
Now allows to double click on rows, if you look at a class or record. It will then display this member (in full, not just the address / that is, if it is of any type that can be displayed)
Same for pointers. They will be derefed.

Useful for has an FList:TFPList,
which as an FList: PPointerList.

You can click through, deref the pointer, and you get the address of the entry at index 0.
The watch expression will look like: (with more added typecast, if needed) PPOINTERLIST(MyList.FCHILDREN.FLIST.FLIST)[0]

All you need to do, is add a typecast.
For any object, you can use TObject, and tell the debugger to find the class. (there is a toggle button "Instance")
TObject(PPOINTERLIST(MyList.FCHILDREN.FLIST.FLIST)[0])

Getting the 2nd or 3rd element from the list can be done by editing the index.

There is a back button, to return to the previous viewed expression. (mouse button 4 will also do / except, if the current expression has no displayable result, that is because pagecontrol then does not trigger the click event)

Reply by email

Giuseppe
to Martin Frb
Show quoted text 24 lines
El 06/02/2014, a las 19:25, Martin Frb escribi?: http://wiki.lazarus.freepascal.org/IDE_Window:_Variable_Inspector Lazarus 1.3 only: Now allows to double click on rows, if you look at a class or record. It will then display this member (in full, not just the address / that is, if it is of any type that can be displayed) Same for pointers. They will be derefed. Useful for looking at TList. TList has an FList:TFPList, which as an FList: PPointerList. You can click through, deref the pointer, and you get the address of the entry at index 0. The watch expression will look like: (with more added typecast, if needed) PPOINTERLIST(MyList.FCHILDREN.FLIST.FLIST)[0] All you need to do, is add a typecast. For any object, you can use TObject, and tell the debugger to find the class. (there is a toggle button "Instance") TObject(PPOINTERLIST(MyList.FCHILDREN.FLIST.FLIST)[0]) Getting the 2nd or 3rd element from the list can be done by editing the index. There is a back button, to return to the previous viewed expression. (mouse button 4 will also do / except, if the current expression has no displayable result, that is because pagecontrol then does not trigger the click event)

Looks very interesting, there are snapshots of 1.3 or svn build should be done?

Reply by email

Martin Frb
to Giuseppe
Giuseppe wrote
Looks very interesting, there are snapshots of 1.3 or svn build should be done?

Snapshots are currently not maintained, but it seems there still are some: ftp://ftp.freepascal.org/pub/lazarus/snapshots/

Search for todays date.

Depends on your OS. (But in case, I saw an 1.3 for win32)

Reply by email

Kostas Michalopoulos
to Martin Frb

Is it possible to make this a tree view with the
records/objects/classes/etc being expandable on the spot instead of going back and forward, like in Visual Studio?

Martin Frb wrote 18 lines
On 07/02/2014 09:34, Giuseppe wrote: > > Looks very interesting, there are snapshots of 1.3 or svn build should be > done? > Snapshots are currently not maintained, but it seems there still are some: ftp://ftp.freepascal.org/pub/lazarus/snapshots/ Search for todays date. Depends on your OS. (But in case, I saw an 1.3 for win32) -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Martin Frb
to Kostas Michalopoulos
Kostas Michalopoulos wrote
Is it possible to make this a tree view with the records/objects/classes/etc being expandable on the spot instead of going back and forward, like in Visual Studio?

That's is the ultimate idea, but it is more work, and I have other stuff to do first. So for now, I went for the quick solution.

Reply by email