[Implemented] Programmatically close the Debug window

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

[Implemented] Programmatically close the Debug window

Post by Little John »

For showing debugging information during the run of my program, I'm using the Debug window.
When an error occurs, it is shown by a MessageRequester(). But I can't see the the MessageRequester(), because it is covered by the Debug window, which is rather big.

So instead of writing

Code: Select all

If error
   MessageRequester("Error", "blah blah")
   End
EndIf
I want to write

Code: Select all

If error
   CloseDebugWindow()
   MessageRequester("Error", "blah blah")
   End
EndIf
so that the Debug window is closed, before the MessageRequester() is shown.

For this purpose I'm currently using this code by netmaestro (thank you!).

However, a built-in function named say CloseDebugWindow() would be cross-platform and nice to have.
Last edited by Little John on Mon Jun 06, 2016 7:47 pm, edited 1 time in total.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Programmatically close the Debug window

Post by Mistrel »

This can be done through Win32 but I don't have a cross-platform solution. :|
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Programmatically close the Debug window

Post by Dude »

Little John wrote:I can't see the the MessageRequester(), because it is covered by the Debug window
Sounds like the debugger windows are set to always on top in the Prefs? Maybe disable that?
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Programmatically close the Debug window

Post by Little John »

Dude wrote:Sounds like the debugger windows are set to always on top in the Prefs? Maybe disable that?
Oops! I've almost forgotten about that setting. :oops:
Thanks for reminding me!

Well, the PB team will decide whether this feature could still be useful.
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Programmatically close the Debug window

Post by Little John »

Implemented in PB 5.50: CloseDebugOutput()

Thanks! :-)
Post Reply