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

Benoît Minisini benoit.minisini at gambas-basic.org
Sat Dec 16 14:30:32 CET 2023


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 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.

Regards,

-- 
Benoît Minisini.



More information about the User mailing list