[Lazarus] Playing with debuggers

Martin Frb lazarus at mfriebe.de
Tue Sep 14 02:18:28 CEST 2021

On 14/09/2021 01:00, Joost van der Sluis via lazarus wrote:
> Hi all,
> I'm playing with several debuging-concepts. And I want to share this 
> one with you.
> I've created a new Lazarus-debugger LazDabDebugger that can work with 
> FpdServer. It depends on a package (LazDebugExtensionIntf) that adds 
> another way of showing debugging variables inside Lazarus.
Great, the frontend was overdue for a remake.

I have not yet looked at the code.
But ideally this should just replace/extend the existing watches. Of 
course that also would need the debugger intf to be updated.  (That does 
need an overhaul, and yes it could mean all existing debuggers will need 
a bit of work to follow / ideas welcome)

Ideally the entire debugger frontend could move into a package of its 
own too (all the current windows).

> I can write tons of texts about the background and possibilities. But 
> for now I'm just curious at your input.
Currently the debugger intf allows to fetch watches as plain text, or as 
structure. But this has to be passed in as flag at the request time.

Any watch object should instead have methods to fetch "sub watches" so 
structures can unfold.
I see you pass the variable to the debugger, that is ok. But that may 
well get abstracted into the Watch, so the watch has its own ref to the 
debugger, and makes the needed calls.

Not sure about passing callbacks directly. Thinking of the current 
notification system (data monitors).
What does your new watch window do, if the user modifies a variable? 
This triggers re-eval of all watches (so they need to unfold again).
Currently the debugger backend can trigger the re-eval, and through the 
data-monitors tell everyone about the updates.

Have to look at it in more detail....

More information about the lazarus mailing list