Page 1 of 2

[Implemented] Debug Output...

Posted: Sun Aug 13, 2006 6:05 pm
by RichardL
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?

Posted: Sun Aug 13, 2006 6:38 pm
by MaxNorris
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.

Posted: Sun Aug 13, 2006 6:42 pm
by Trond
I thought about the same a few days ago. In the process I tried out the option to change font for the tools. Unfortunately it didn't work for the debug window and there was no way to revert to the default font.

Posted: Sun Aug 13, 2006 6:48 pm
by netmaestro
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> )

Posted: Sun Aug 13, 2006 7:03 pm
by netmaestro
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.

Code: Select all

 Debug ( "EEEEEE "+"      "+Str(100) )
 Debug ( "iiiiii "+"      "+Str(22) )
 
 Delay(1000)

 Debugg( "EEEEEE "+"      "+Str(100) )
 Debugg( "iiiiii "+"      "+Str(22) )
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.

Posted: Mon Aug 14, 2006 7:50 am
by RichardL
LBS_USETABSTOPS ?? Yes, that would get my vote as well.

Long strings of HEX values origination from a HEX Dump function I use for debugging are fairly 'solid' and list badly in the debugger at present.

Posted: Mon Aug 14, 2006 12:53 pm
by PB
@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. :(

Posted: Mon Aug 14, 2006 5:33 pm
by netmaestro
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.

Posted: Tue Dec 05, 2006 5:45 pm
by harff182
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

Posted: Thu Dec 07, 2006 11:27 pm
by mskuma
When running a unicode program, it would be nice when copying the text from the debug output that it could be copied in unicode also.

Posted: Thu Dec 07, 2006 11:38 pm
by freak
mskuma wrote:When running a unicode program, it would be nice when copying the text from the debug output that it could be copied in unicode also.
Use the standalone debugger option. It has full unicode support. The IDE itself has not.

Re: Debug Output...

Posted: Mon Mar 22, 2010 7:09 pm
by skywalk
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! :shock:

Thanks for a great tool.

Re: Debug Output...

Posted: Tue Aug 24, 2010 5:17 pm
by IdeasVacuum
....and also respect #CRLF$

Re: Debug Output...

Posted: Tue Aug 24, 2010 8:06 pm
by blueznl
Yeah, just a toggle to go for a fixed font would be great! I know Fred hates this, but...

+2399283749237

:-)

Re: Debug Output...

Posted: Wed Aug 25, 2010 11:19 am
by Trond
blueznl wrote:Yeah, just a toggle to go for a fixed font would be great! I know Fred hates this, but...

+2399283749237

:-)
What do you mean? You can set a fixed width font now. It's just off by default.