Forum > Debugger

"Debug visualizers" / Value-Formatter (replace)

(1/1)

Martin_fr:
I have started (work in progress) on Debug visualizers.

That means, the debugger can now show the float value in a TDateTime as human readable date.
And it can lookup TColor names.

This feature is still being worked on. Especially the interface to add 3rd party, is experimental (not even a draft yet).

But the build-in parts can be used.
- Tools > Options > Debugger > Value Formatter
- Project > Project Options > Debugger > Value Formatter


DateTime can format TDate, TTime and TDateTime.
Independent of the type it will check if the date or time part are zero, and chose a format (you can set all 3 formats to full date-time or whatever you need).

TColor can show
- clAqua
- RGB(1,2,3)  hex or decimal
- both

TAlphaColor is similar. But FPC sets the type in debug info to LongWord. (should be fixed in todays 3.3.1, but not tested yet)
(and requires fpc 3.2.3 for name lookup, but can to the "ARGB()" with 3.2.2)


All of them can show the original value along with the replacement.


Currently only done for Watches, Locals, and the editor hint.
All other debug windows are still on my todo.

Also they currently only work on stand-alone values. A TDate inside an object will not be visualized (it will (probably) in watches, if you use the "+" to expand, and have the field in a row of its own)



Any feedback is welcome.
Does it work as expected?
What would you like to be added?
Ideas?

This is meant to replace the textual representation. I am aware that other IDE also have GUI plugins for custom windows to view watches. => useful, but not part of this particular project.

Note, there will be an API/Interface to add your own value formatter.
The units are already in place, but the current interface is definitely still getting big changes.

Navigation

[0] Message Index

Go to full version