Debug CLS

Previous topic - Next topic

bigsofty

Could we have a command for clearing the debug console, after a few regular DEBUG prints its very confusing whats happening.

for example a loop with...

Code (glbasic) Select
   DEBUG "MX: "+mx +","
    DEBUG "MY: "+my+","
produces...

Code (glbasic) Select
MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,MX: 0,MY: 0,...with the debug console scrolling continuously

If we had the command DEBUGCLS

Code (glbasic) Select
   DEBUGCLS
    DEBUG "MX: "+mx +","
    DEBUG "MY: "+my
Code (glbasic) Select
MX: 0,MY: 0or

Code (glbasic) Select
   DEBUGCLS
    DEBUG "Mouse Co-Ordinates"+"\n"
    DEBUG "------------------"+"\n"
    DEBUG "MX: "+mx +"\n"
    DEBUG "MY: "+my+"\n"
produces...

Code (glbasic) Select
   Mouse Co-Ordinates
    ------------------
    MX: 0
    MY: 0
Just a suggestion ;)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Quentin

good idea I think

Schranz0r

You can simple Debug mx or any other Var.  @ the right side of the IDE !
New are Array[] Debuging !
Thats Nice , Gernot :D
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Kitty Hello

If you need DEBUGCLS, you can use PRINT on the screen as well for debugging. No?

bigsofty

I can use Print but the console is free debug display space and easier to read. So if I need to watch what happens on the screen without the screen being blocked and overwritten with debug stubs, then the console would be ideal.

CLEARCLS, used in this way allows a basic debug variable 'watch' functionality.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

Well, OK. I'm adding it. I thing DEBUG "\f" is what I'll do. \f is a form-feed (new page for a printer), that fits pretty good, OK?

bigsofty

Hehe, thanks Gernot! :)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)