[Gambas-user] Viewing Picture/Image objects in the IDE debugger FDebugExpr

Bruce Steers bsteers4 at gmail.com
Sat Dec 16 17:45:45 CET 2023


On Sat, 16 Dec 2023 at 13:31, Benoît Minisini <
benoit.minisini at gambas-basic.org> wrote:

> Le 15/12/2023 à 23:15, Bruce Steers a écrit :
> >
> >     Do you understand how the debugger works?
> >
> >
> > not a clue my friend.
> > I assume by that response that it is is really not as simple as i may
> think.
> >
> > My assumption is that as it can get various datatype values like
> > integers / strings /etc that getting Picture data may also be possible.
> >
> > Sigh , i wish it was that simple.
> > can we not use the id given by Print to get a pointer to the data?
> > eg with Print i get...
> >
> > Picture 0x559a968a1078
> >
> > is the 0x559a968a1078 part usable?
> >
> > Respects
> > BruceS
> >
>
> The debugger is a special mode of the interpreter that you run with the
> '-g' option.
>
> In that mode, the interpreter read debugger commands on its standard
> input and print the result on its standard output.
>
> Some options allows to use some fifo instead of the standard input /
> output. This is used by the IDE to debug a project.
>
> It should be possible to implement what you want by letting the IDE ask
> the debugger to eval an expression that saves the image in a specific
> format (PNG or JPEG) inside a temporary file, and then load that file to
> display it.
>

Maybe Image.FromString Picture.FromString could be used here by the
debugger to not even need a temp file and just get the data as string?



> Maybe it's time to revamp a little the interface of the debugger
> expression window.
>
> You can notice that this window has already two modes for collection and
> arrays: display the object properties, or display the object contents.
> The same distinction would be added for Image and Picture.
>

That would be amazing.

I could implement it in many ways if there was a way.
My current train of thought was to open a popup window to display the
image. another idea was a hidden panel in the expression viewer that shows
upon request for an image object.

i have been using Paint.class a bit recently to paint direct to picture
objects , being able to see the picture was a case of using Picture.Save()
in the code, i though darn it would be useful if the expression viewer
supported images. :)

Many thanks
Much respect
BruceS



> Regards,
>
> --
> Benoît Minisini.
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231216/889e705b/attachment.htm>


More information about the User mailing list