[Lazarus] RE : RE : RE : RE : RE : Issuing debug commands from the ide.

Ludo Brands ludo.brands at free.fr
Sat Jun 2 09:23:06 CEST 2012

> On 01/06/2012 21:30, Ludo Brands wrote:
> > is this worth the effort?
> Well that depends how many people benefit.
> Though having said that, there is nothing wrong with a 
> feature, even if 
> there was just one person. SO long as in is no issue to others.

That was my point. Adding a front-end to 'info function' is going to cause
more confusion with first time users than solving problems. Enter something
like CRT and your screen is flooded with symbols from the RPCRT4 dll. Enter
dll, wait 30 seconds and get hundreds of ntddl and _$dll$user32$ entries. So
this does not fall IMHO in the category of "So long as it is no issue to

> I might be persuade to put (part of (see below)) it i an appropriate 
> IFDEF. No not an option.

The patch is concentrated in 2 blocks in 2 files and is very unlikely to
cause svn conflicts and will survive svn updates. I'm perfectly happy
keeping it that way and am not trying to persuade you for anything. If you
like some ideas you want to include in the standard version, so much

> 1) this a 2 individual things.
> keeping a scrolling history in the evaluate window can be 
> done for all 
> evaluates. May even be useful. Could have a checkbok in that window.
> So that part is to be skipped. But a better version is welcome.

What would a better version look like, other than the checkbox and perhaps a
clear history button? Ctrl-A del works perfectly btw. A better visual
differentiation between expression and result? 

> 2)
> Any reason to limit to wdDefault ?
> Since you always set ddsValid you could have it in the main 
> method body 
> (where the "!" is handled ( a relict, that will go ....))
1) I didn't know the debugger code before starting this little patch.
wdDefault is used in both evaluate and watch. And all the functions and
variables needed are in scope of the function since they are used in the
other "case" blocks. I noticed the main body and the handling of "!" but
took the road of least resistance and put the code where all was available,
guaranteed, without further investigation.
2) It is cleaner to have same level of functionality in the same place. Even
if not limited to wdDefault I would have put the 'if' before the 'case'.
3) In hind sight, for the watch, I prefer getting an error message when
selecting display options like mem dump, character, decimal on a cli command
than ignoring them. A new watch is created with wdDefault and a user selects
another display format if he wants another format. With cli commands he
won't get another format and the error message will somehow ack that. 

Thanks, Ludo

More information about the Lazarus mailing list