Page 1 of 1

[Implemented] Programmatically close the Debug window

Posted: Sun Nov 29, 2015 8:43 am
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.

Re: Programmatically close the Debug window

Posted: Sun Nov 29, 2015 11:44 pm
by Mistrel
This can be done through Win32 but I don't have a cross-platform solution. :|

Re: Programmatically close the Debug window

Posted: Mon Nov 30, 2015 8:14 am
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?

Re: Programmatically close the Debug window

Posted: Mon Nov 30, 2015 5:04 pm
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.

Re: Programmatically close the Debug window

Posted: Mon Jun 06, 2016 7:46 pm
by Little John
Implemented in PB 5.50: CloseDebugOutput()

Thanks! :-)