[Gambas-devel] Debug enhancing (01-43) with source files and diff-files

Benoit Minisini gambas at ...1...
Sun Sep 24 20:29:24 CEST 2006


On Saturday 23 September 2006 23:08, Charlie Reinl wrote:
> Salut Benoît,
>
> this is the version for gambas2-1.9.43
>
> Changes :
> resizeable Form
> and also see teh mails this evening.
>
> Amicalment
> Charlie

I have committed some changes for you in the debugger.

You now have a new command named '#' that prints information about arrays, 
collections and objects.

This command first prints the class name of the object, followed by a space. 
Then:

* For arrays, it prints the number of array elements.

* For collections, it prints the number of elements, a space, and a list of 
keys stored in the collection. Each key is quoted, written between double 
quotes, and separated a space. Everything is written on one line.

* For objects, it prints a list of public properties and variables, separated 
by a space. If a property or variable is static it is suffixed by the '(S)' 
string. Everything is written on one line.

If you use '#' on something that is not an object, the command returns 
nothing. Maybe it should return a void line, for consistency.

The '?' command does not print array or collection contents anymore. To get 
information about objects contents, you must use the '#' command, and the '?' 
command again to get the value of each object part.

Now, let's talk about the balloon replacement.

I'd like you make a new form dedicated to printing the value of an expression. 
Let's call this form 'FDebugExpr' for example.

This form should display first what the '?' command returns.

Then you use a TableView to display each object part. If the user 
double-clicks on an object part that is an array, a collection or an object, 
you open a new FDebugExpr window that prints the part contents.

I suggest that FDebugExpr is border-less, like a yellow note of KNotes, or at 
least has the ToolBox property set.

If the debugger runs the code, then all FDebugExpr windows must be refreshed. 
The ultimate feature then would be displaying in red the values that changed 
since the last debugger stop.

I think what I wrote is not very different from what you have already done, 
but now you have the needed debugger command.

I added a new method in the Design class, Design.Eval(), so that you can get 
the value of any expression withotu having to deal with the event loop.

Tell what you think about all that!

Regards,

-- 
Benoit Minisini





More information about the Devel mailing list