For each data type (integer, class, record, ...) the watches Window has some way to display it.
Some people will like very verbose, others rather condensed output. There may be many preferences. This poll is to help me understand what those preferences are. (It is not a vote).
What it is not about.
Anything that falls into the below categories, please do not add to this topic. Thanks.
1) Content, rather than Format:
I know "properties" are not currently shown, I agree they should. But that is not about the
DisplayFormat.
I know "interface" shows empty. Not a format issue.
2) Stack, Threads, Evaluate, Inspect window.
This is only about Watches and Locals (and maybe/probably eval in Editor-Hints)
3) Color or font-style
Just text. E.g. "Foo=1" vs "Foo = 1" vs "Foo: 1"
4) Not about specific types
TDateTime is floating point and show as such => there needs to a better way. But in this topic, this would be how should all/any data of type float be shown.
TPoint/TRect will be handled the same as any other "record"
Individual display rules for such types are important => but not part of this topic
5) The ability of expanding/collapsing a value with the [ + ] / [ - ] icons
6) Customizable config (beyond the choice of DisplayFormat). A valid point, but not this topic.
7) Bugs
If any data currently is displayed buggy => Bug tracker please.
8) Partly not: Shortcomings of gdb based debugging (or any debugging without FpDebug in the name). Those can be listed, but the main target is formatting when/if FpDebug is involved.
If you have questions or suggestions on any of those, please open a new thread.
What it is about.
Watches have a DisplayFormat ("type" in the watch properties).
Locals and Hints use the default DisplayFormat.
An Integer watch can be accordingly displayed as decimal, hex, bin, ...
For records classes, there is default vs structure.
The values are then (or can be) printed in different ways.
E.g. should numbers have in some format thousand seperators?
Should structures (or nested structures) have fieldnames, should it be colon or equal, ....
So if anyone has ideas of what the would prefer, the entry should include
- type of data: ordinal, floating-point, record, object, class, boolean, enum, set of, array, ....
- current output
- desired output
Exception to point (7) above: Maximum display length (before cut off) for strings. Or strings in (nested) structures. Or arrays, nested arrays.... Those may depend on DisplayFormat and if the data is stand alone, or in a structure or array.
Thanks for any feedback.
EDIT: Suggestions for the editor-hint or locals Windows => please mark accordingly. Default assumption is the Watches window.
Below is a summary of the suggestion - todo, not yet in 3.99 (To be updated occasionally)
https://forum.lazarus.freepascal.org/index.php/topic,66143.msg505542.html#msg505542 440bx
* For records/structures in multi-line print (e.g. in editor-hint):
-
One field per line Awaiting clarification
- horizontal (table) align columns for labels and data.
https://forum.lazarus.freepascal.org/index.php/topic,66143.msg505546.html#msg505546 440bx
* When several numbers are printed vertical (array) then right align them (or align on the decimal dot).
https://forum.lazarus.freepascal.org/index.php/topic,66143.msg508582.html#msg508582 440bx
* "array of char" as string display. (including cut-of/deal-with trailing #0)https://forum.lazarus.freepascal.org/index.php/topic,66143.msg508632.html#msg508632 Nicole
* Per watch switch for Date-time "watch visualizer" (print float as date)https://forum.lazarus.freepascal.org/index.php/topic,66143.msg509012.html#msg509012 avra
*
some form of quick-toggle between certain display formats (also by 440bx for data/mem-dump toggle)
https://forum.lazarus.freepascal.org/index.php/topic,66143.msg509474.html#msg509474 han
*
"len" prefix for nested array*
:ord() intrinsic*
Eval/Mod-Win: disable word-wrap for table displayhttps://forum.lazarus.freepascal.org/index.php/topic,66143.msg509486.html#msg509486 han
*
3 (or higher) dim array: Display in blocks, so Y can be used for 2nd or 3rd dimension (allow decision which dimension make x/y)https://forum.lazarus.freepascal.org/index.php/topic,66143.msg510643.html#msg510643 han
*
Watches: Make array toolbar optional, if array-len is less than one page Added "AutoHide" and default for PageSize, can be controlled in DisplayFormat settings
https://forum.lazarus.freepascal.org/index.php/topic,66143.msg510651.html#msg510651 zvoni
*
list display for nested list See
https://forum.lazarus.freepascal.org/index.php/topic,67980.0.html https://forum.lazarus.freepascal.org/index.php/topic,66143.msg511327.html#msg511327 440bx
* Option to display address short / without leading zeroshttps://forum.lazarus.freepascal.org/index.php/topic,66143.msg511387.html#msg511387 440bx
* Multi-line text representation: Option to multi-line nested values (at higher indent)
Also, nested Pointer should keep deref value as multiline (compare pane on images)
https://forum.lazarus.freepascal.org/index.php/topic,66143.msg512401.html#msg512401 https://forum.lazarus.freepascal.org/index.php/topic,66143.msg512401.html#msg512401 440bx
* review repeat count