[Implemented] Debug Output...
[Implemented] Debug Output...
Maybe I’ve missed a buried option switch somewhere… but it would be so much more convenient if the Debug Output window could be switched to use a non-proportional font. Tabular data would be much clearer and easier to understand.
Opinions anyone?
Opinions anyone?
I've only been messing with PB for a couple days, the demo version at that, but that does make sense.. just throw an option somewhere in the debugger preferences to set a font.. or at least say switch between something like Arial and Terminal. You can use Chr(9) to embed tabs, but it wont show correctly in the debug window, but if the debug data is saved and opened in notepad it'll show correctly.. a fixed font would make it a lot simpler.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Agreed, it would be a good feature. In the meantime, if you want the functionality you can stick this at the top of your source during development and remove it when finished:
Code: Select all
ProcedureDLL SetDebugFont()
debugwin = 0
t=ElapsedMilliseconds()
While Not debugwin
debugwin = GetWindow_(FindWindow_(0,"Debug Output - "),#GW_CHILD)
Delay(1)
If ElapsedMilliseconds()-t > 500
Break
EndIf
Wend
If debugwin
SendMessage_(debugwin, #WM_SETFONT, GetStockObject_(#SYSTEM_FIXED_FONT), 1)
EndIf
EndProcedure
Macro Debugg(value)
Debug ""
SetDebugFont()
Debug value
EndMacro
;usage: Debugg( <value> )
Last edited by netmaestro on Wed Dec 06, 2006 9:51 am, edited 2 times in total.
BERESHEIT
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Hm - it doesn't seem to work. It changes the font but not to what you specify. Gotta look a bit deeper into this..
[edit] Fixed. The posted source is updated and works now.
Additionally, I don't see a downside to the team applying the LBS_USETABSTOPS style to the debug window listbox - is there one? If not, I'd like to see it implemented too.
[edit] Fixed. The posted source is updated and works now.
Code: Select all
Debug ( "EEEEEE "+" "+Str(100) )
Debug ( "iiiiii "+" "+Str(22) )
Delay(1000)
Debugg( "EEEEEE "+" "+Str(100) )
Debugg( "iiiiii "+" "+Str(22) )
BERESHEIT
@netmaestro: Nice tip, but how would we modify it so we can use the font of
our choice, instead of using #SYSTEM_FIXED_FONT? I've tried with loading a
font and using its load return value, but it doesn't work.
our choice, instead of using #SYSTEM_FIXED_FONT? I've tried with loading a
font and using its load return value, but it doesn't work.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Hi PB! -argg I don't know. I started by putting in Courier New, and I saw the font changing and that made me think it was working, but the font it was sticking in there wasn't what I chose. Further experiments showed that the stock fixed font would go in so I just did that. I was also rebuffed in my attempt to apply the LBS_USETABSTOPS style, as MSDN says it can't be changed after the control is created. Any progress someone can make on these fronts, a post would be really welcome.
BERESHEIT
Nice and usefull Macro 
But I get an empty line between the debugg-lines
How can I avoid those empty lines ?
And your example-lines show, that it doesn't work here (XPHome,SP2 PB401)
TIA.....
scholly

But I get an empty line between the debugg-lines

How can I avoid those empty lines ?
And your example-lines show, that it doesn't work here (XPHome,SP2 PB401)
TIA.....
scholly
Sorry 4 my poor English, it's the only one I learned 40 years ago...
since 17.12.08: XPHome(SP3) + PB 4.30
since 17.12.08: XPHome(SP3) + PB 4.30
Re: Debug Output...
Hi,
This topic is old, but I think it would be great for new users like me if the Debug Output Window default font was fixed pitch like courier new or something similar.
I only recently figured out the font was editable.
This makes the debug window so much more readable!!
I feel like I have been wearing someone else's prescription glasses for months!
Thanks for a great tool.
This topic is old, but I think it would be great for new users like me if the Debug Output Window default font was fixed pitch like courier new or something similar.
I only recently figured out the font was editable.
This makes the debug window so much more readable!!
I feel like I have been wearing someone else's prescription glasses for months!

Thanks for a great tool.
Last edited by skywalk on Tue Jul 08, 2014 12:28 am, edited 1 time in total.
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Debug Output...
....and also respect #CRLF$
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Debug Output...
Yeah, just a toggle to go for a fixed font would be great! I know Fred hates this, but...
+2399283749237

+2399283749237

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: Debug Output...
What do you mean? You can set a fixed width font now. It's just off by default.blueznl wrote:Yeah, just a toggle to go for a fixed font would be great! I know Fred hates this, but...
+2399283749237