On Wed, 30 Sep 2020, Ondrej Pokorny via lazarus wrote:

On 30.09.2020 10:55, Michael Van Canneyt via lazarus wrote:
Does Lazarus offer the functionality Delphi has (since quite some time, I
might add):  custom debug info visualizers ?

See

http://docwiki.embarcadero.com/RADStudio/Sydney/en/Debugger_Visualizers

Seems like a useful addition. Don't know if it is technically feasible, though.

Yes, I implemented them, IIRC. Don't remember the details, though. I added TDate, TDateTime and TTime formatters. It was quite a simple addon, should be easy to find in the sources.

Good news :-)

How to activate them ? Because everywhere I tried, a TDateTime is still
displayed as a float: 44104.47848875 does not look like a date/time I can
recognize...  :-)

I tried tooltip evaluation, evaluate/modifiy, inspect, local variables,
watches. None of them seems to use this.


The problem of object-based visualizers like a visualizer for TStrings is that your Lazarus IDE has to be compiled with the same FPC version/codebase that you also use for the debugged program. In Delphi this is usually the case (if you don't fiddle with RTL sources to fix bugs). In FPC/Lazarus this doesn't need to apply. I usually build Lazarus IDE less frequently than I update and build FPC trunk. Or you can build Lazarus with FPC stable but develop applications with FPC trunk. In that case such additions are unsafe.

I understand this need to keep versions aligned, but for the average user who simply installs Lazarus, this will always be the case: they get lazarus/FPC bundled.

In this matter the Laz/FPC developers are the exception.
(one could think "it's their own fault that they make it difficult" ;-) )

So with this caveat in mind, I think support for object-based visualizers
should definitely be added. Lazarus can easily enough detect that the version
of FPC it uses for a project differs from the FPC version the IDE was compiled
with, and disable the object-based visualizers.

Michael.
-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to