Page 1 of 2

Clear the window debugger [Resolved by NETMAESTRO]

Posted: Tue Jan 01, 2008 10:20 am
by Kwai chang caine
Hello everybody.

I want to know, if is possible to clear, with a code, the window debugger ?

Because, when i have many variables in a loop, i don't have the time to read all :cry:

Re: Clear the window debugger

Posted: Tue Jan 01, 2008 11:22 am
by PB
It's been requested but not implemented yet.

Posted: Tue Jan 01, 2008 2:12 pm
by Kwai chang caine
Thanks PB for your answer 8)

It's not possible with the handle ?

Posted: Tue Jan 01, 2008 2:34 pm
by Marco2007
What about Breakpoint + clear output + continue?

Posted: Tue Jan 01, 2008 5:45 pm
by netmaestro
You can use mine, it's the one I use internally:

http://www.greatlakescode.com/ClearDebugWindow

Put it in your Userlibraries folder, remember to restart the compiler or ide.

Test program:

Code: Select all

Debug "Happy New Year!" 
Debug "Bullfrogs rule the world" 
Debug "Stand by for a cleared debug window in one second..." 
Debug "" 
Delay(1000) 
ClearDebugWindow()

Posted: Tue Jan 01, 2008 6:04 pm
by Kwai chang caine
Thanks Master of NET

I'm so sad, because i have put your library into the "C:\Program Files\PureBasic\v4.10\PureLibraries\UserLibraries", i run the PureBasic v4.20 Beta and nothing passed :(

Then, i have the same operation with the PureBasic v4.10 and i have the same resultat :(

Posted: Tue Jan 01, 2008 6:15 pm
by netmaestro
The original version I posted was an earlier one that had a bug. Try downloading it again and see if it works for you. If the IDE is open, make sure you do Compiler->Restart Compiler. It is going to work, guaranteed.

Posted: Tue Jan 01, 2008 6:35 pm
by Kwai chang caine
I don't understand, i have download again your library.
I have close the pureBasic
I have put your library into the "C:\Program Files\PureBasic\v4.10\PureLibraries\UserLibraries"
I have run purebasic 4.10 and run your code.

And nothing works :(
It's the same result with Purebasic 4.20

I have perhaps did a mistake :oops:

Posted: Tue Jan 01, 2008 6:42 pm
by netmaestro
Does the command "ClearDebugWindow()" automatically case-correct? I mean, is it recognized as a command? If so, what is the return value? It will return 1 if it believes it was successful, 0 if not.

Posted: Tue Jan 01, 2008 6:53 pm
by Kwai chang caine
I have write this code in the IDE of PureBasic v4.20 :

Code: Select all

Debug "Happy New Year!" 
Debug "Bullfrogs rule the world" 
Debug "Stand by for a cleared debug window in one second..." 
Debug "" 
Delay(1000) 
Debug ClearDebugWindow() 
And the return of debugger is :

Code: Select all

Happy New Year!
Bullfrogs rule the world
Stand by for a cleared debug window in one second...

0
They are no error message.
I think the instruction is reconized :roll:

Posted: Tue Jan 01, 2008 6:53 pm
by milan1612
Works like a charm here :)
(XP, 4.10)

Posted: Tue Jan 01, 2008 6:56 pm
by Kwai chang caine
I have again make a mistake :oops:

Posted: Tue Jan 01, 2008 6:56 pm
by netmaestro
AHA!! I know what the problem is, it's a language barrier. The code looks for a window with title "Debug Output -" as the first 14 characters but you're not using English, are you? Yours is a different language I'll bet. What is the window title of your debug output window?

Posted: Tue Jan 01, 2008 7:07 pm
by milan1612
Should be "Messages du débogueur - " (according to the language file)

Posted: Tue Jan 01, 2008 7:15 pm
by Kwai chang caine
@ Milan1612
Yes

@NETMAESTRO
You are so clever 8)

The title of my debugger is :
Messages du débogueur -