DEBUG command

Working on new editor enhancements?
Jan2004
Enthusiast
Enthusiast
Posts: 183
Joined: Fri Jan 07, 2005 7:17 pm

DEBUG command

Post 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 ?
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

Post by Fou-Lu »

It's working here. (3.93)
edit: You are clicking on the buttons, right?

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
Jan2004
Enthusiast
Enthusiast
Posts: 183
Joined: Fri Jan 07, 2005 7:17 pm

Post 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".
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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) ?
Jan2004
Enthusiast
Enthusiast
Posts: 183
Joined: Fri Jan 07, 2005 7:17 pm

Post 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 ?
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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 !
Jan2004
Enthusiast
Enthusiast
Posts: 183
Joined: Fri Jan 07, 2005 7:17 pm

Post by Jan2004 »

Of course 8) , in the topic "Using the debugger". (Debugger enabled). Thanks !
Post Reply