Debug - show frontbuffer and backbuffer keys

Previous topic - Next topic

FutureCow

I'd like to request that when stepping through code you have a key to show you what the current frontbuffer looks like, and another key to show you what is currently in the back buffer.

Kitty Hello

The frontbuffer is visible. The backbuffer can be debugged with:

Code (glbasic) Select

GRABSPRITE 1000,0,0,1024,800
SAVESPRITE "tmp.png", 1000
GRABSPRITE 1000,0,0,0,0
// SHELLCMP "MSPaint"...

FutureCow

I can't see the frontbuffer.
I compile in debug mode, pause the program and step through one line at a time. As soon as the program is paused, the button on my taskbar relating to the running program disappears - it only reappears for a split second when I run the "showscreen" line and disappears again straight away.
As the window isn't there, I can't alt-tab to it to see the current state of the front buffer.

The code for the backbuffer would work, but has some issues
(1) If I want to debug the back buffer after every line building the game screen then I'll have to insert those 3 lines / call them from a function after every line of code in my program. Stepping through my code one line at a time then becomes a nightmare
(2) It also involves constantly swapping into a drawing program and reloading the temporary image each time.

If I want to check the back buffer after each line of screen building code, over multiple game frames, this is not practical.

Kitty Hello

Hm. I might think of a way to temporarily store both buffers in debug mode. Might take some time, though.

Moru

The ability to see the backbuffer while debugging is very useful while learning the language still, to see why things end up behind other objects or just disappear because you forgot that you paint the background last :-)

FutureCow

The back buffer is probably the priority for me. As Moru said it would be great to be able to see how it builds the screen while you're stepping through the code to see what bit of your code is doing something wrong.