Page 1 of 1

DEBUG command

Posted: Sun Aug 07, 2005 12:40 pm
by Jan2004
I work with PureBasic v3.94 Beta 4. In help file is writtten: "DEBUG: Display the DebugOutput window and the result inside it"
I am just experimenting with the following code:

window_nr = OpenWindow(#PB_Any,100,100,150,150,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"Test")
window_id = WindowID(window_nr)
CreateGadgetList(window_id)
ButtonGadget(1,10,50,90,20,"Button 1")
ButtonGadget(2,10,70,90,20,"Button 2")
;
Repeat
event = WaitWindowEvent()
Select event
Case #PB_EventGadget
Select EventGadgetID()
Case 1
Debug "gadget 1"
Case 2
Debug "gadget 2"
EndSelect
EndSelect
Until event = #PB_Event_CloseWindow


I can not see DebugOutput window when I use Compile/Run from Compile menu. Could you explain me why ? May be Debug works another way ?

Posted: Sun Aug 07, 2005 6:27 pm
by Fou-Lu
It's working here. (3.93)
edit: You are clicking on the buttons, right?

Posted: Thu Aug 11, 2005 10:55 am
by Jan2004
Yes. You are right - so I am answering for my own question:
In File/Preferences/Debugger/Default Windows select only "Debug Output", press "Apply".

Posted: Thu Aug 11, 2005 11:23 am
by Fred
That's wierd, the debug window should display itself when a debug command is called (and the window wasn't opened). It works as expected here, can you confirm than it doesn't for you (if you uncheck the "Debug Window" option) ?

Posted: Thu Aug 11, 2005 11:46 am
by Jan2004
1. "Debug Window" (from "File/Preferences/Debugger/Default Windows")option - unchecked
2. Command "Compile/Compiler with Debbuger" shows Debug Output Window.

By the way: Whan can I find a detailed description of "Debbuger" menu ?

Posted: Thu Aug 11, 2005 12:15 pm
by Fred
In the doc :) (look for the Purebasic.chm, in the Beta 5). Of cource the Debug command works ONLY if debugger is enabled !

Posted: Thu Aug 11, 2005 6:53 pm
by Jan2004
Of course 8) , in the topic "Using the debugger". (Debugger enabled). Thanks !