[Lazarus] Some debug facts/improves

Marc Weustink marc.weustink at cuperus.nl
Mon Oct 5 10:39:24 CEST 2009


JoshyFun wrote:
> Hello Lazarus-List,
> 
> Sunday, October 4, 2009, 7:21:44 PM, you wrote:
> 
>>> 1) Once stop on exception the assembler window will only appear if no
>>> backtrace information is available. It will show the clser offended
>>> line with debug information.
> 
> MW> I thought it was already the case :)
> 
> No it was not always the case, I do not know exactly the reason, but
> without the changes in most cases the line is never displayed and even
> the callstack changes :-? Looks like something in the assembler window
> changes the stack in someway and the offended line is no more at which
> it is expected. I'll recheck my changes in order to match the real
> difference once I'm getting into the debugger inners.

OK. When you have a patch, have it separate form other changes.


>>> 3) Records are now displayed in multiline also and the record type
>>> name is displayed in the first line.
> MW> Formatting of output shouldn't be done in the debugger classes. The idea
> MW> is/was always to be able to hook in different debuggers. So a class
> MW> should be reported in some kind of class like TGDBType (but then 
> MW> generalized as TDBGType), where the IDE can format the output as it
> MW> wants depending on the location something is shown.
> MW> In a hint you want lines, in a watches view you may want some 
> MW> collapsable tree.
> 
> I know, and that's my next step if there is interest. But by now and
> in order to help me in my other projects I'm using the "default"
> returned format, mostly to try to understand the code and at the same
> time get something usable as fast as possible.

The latter often wont help. Then all dirty fast solutions will be added 
to lazarus, which will lead to troubles when you want to do it the 
better way. So you'll end up with the dirty solution.

> If you have changes in your local codebase will be great to send them
> to me in a diff to not overlap any work. If you are planning to
> improve debugger asap I'll stop my changes and wait, as your skills
> with the debugger is around 1000 times mine :)

I should have done somme changes, but not yet. I'll see if I cas move 
TDBGType soon.

Marc





More information about the Lazarus mailing list