Recent

Author Topic: Watch List Hint  (Read 829 times)

staratel20

  • Full Member
  • ***
  • Posts: 206
Watch List Hint
« on: February 10, 2024, 07:12:56 pm »
Hi Team

Is it possible to see the same object hint in the Watch list, that I see during runtime in Editor. If it option cannot be enabled it would be a good idea to implement it
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9696
  • Debugger - SynEdit - and more
    • wiki
Re: Watch List Hint
« Reply #1 on: February 10, 2024, 07:26:08 pm »
It's an interesting idea. Please make it a feature request on the issue tracker.

Obviously it wont be exactly the same. The source editor hint, includes codetool info (such as declaration and extract from the docs), that won't be included.

But the textual content from the debugger should be available, and possible (including the difference in formatting).

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9696
  • Debugger - SynEdit - and more
    • wiki
Re: Watch List Hint
« Reply #2 on: February 10, 2024, 07:45:48 pm »
In the mean time, are you aware of the "Detail pane"?
https://wiki.freepascal.org/IDE_Window:_Watch_list#Detail_pane

Hit the "magnifier" tool-button, and on the right that of the watches window will be a panel, showing the current/selected watch in more detail.

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Watch List Hint
« Reply #3 on: February 12, 2024, 01:20:26 pm »
1) If I understand correctly - you mean this tracker
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues

2) Yep, but the problem is that the array elements are arranged vertically and take up all the space needed to view other values, - so it is inconvenient to click every time to collapse/expand the array trying to aim squared '+' ))

BTW I was looking for an extension for multiple WatchLists. It would be great if it possible to place variables in vertically-oriented w-list and arrays into a horizontally-oriented watchlist. But I think it's much more difficult to implement
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9696
  • Debugger - SynEdit - and more
    • wiki
Re: Watch List Hint
« Reply #4 on: February 12, 2024, 02:07:01 pm »
1) Yes, that tracker

2) No, not the [ + ]. See the image.
Whatever watch you have selected will be shown in the panel on the right.

3)
Multiple watches Window. Yea, probably not.

You can always have
- one value in the "evaluate modify" window
- one value in the "detail pane" (the panel on the right, in the attached image)
- one value in the "debug inspector"
- and if it is a local var, you also have the "locals" window.

Eventually there may be an API to register your own additions to the debugger... But that is still far far away.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9696
  • Debugger - SynEdit - and more
    • wiki
Re: Watch List Hint
« Reply #5 on: February 12, 2024, 02:14:26 pm »
And, if you use Lazarus 3.0 and FpDebug, then you can watch
Code: Text  [Select][+][-]
  1. MyArray[10..15]

So if your array is really big, you can get whatever slice you need.

The index can be other variable: MyArray[i-2..i+2]

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9696
  • Debugger - SynEdit - and more
    • wiki
Re: Watch List Hint
« Reply #6 on: February 12, 2024, 02:17:16 pm »
Quote
take up all the space needed to view other values,
In case it helps, you can re-order the list using drag and drop

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Watch List Hint
« Reply #7 on: February 12, 2024, 10:44:37 pm »
>>2) No, not the [ + ]. See the image.
My bad! Now I got it. Looks interesting and may be useful

>>MyArray[10..15]
Absolutely nice future! Currently on 2.2.6 but will update soon!

Thank you for so detailed answer!
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

 

TinyPortal © 2005-2018