DebugLog

BlitzMax Forums/BlitzMax Beginners Area/DebugLog

degac(Posted 2007) [#1]
Sorry for this question...but after 2 years using BlitzMax today I discovered this command and - falling from the sky - I'm still asking 'what the .... I can use it?'
I mean I'm using the old one 'Print' to send output to the 'debug console in BlitzMax IDE'.
If I use DebugLog "Hallo" it prints 'DebugLog:HAllo'...and reading the help I have more doubt than before...

Write a string to debug log.
Information If there is no debugger present, this command is ignored.


So the question is: how can I read these strings, or better what debugger I should/could use? (I doubt I will obtain different informations than the standard output in BlitzMax IDE - I believe!)
Thanks


tonyg(Posted 2007) [#2]
I don't really understand what you're saying/asking but debuglog acts the same as print but the comman d is only run when the program is run in 'debug' mode.
Try running
debuglog "Hello"

in both debug and non-debug mode and check output window.


CS_TBL(Posted 2007) [#3]
iirc print in B+ was utter crap. I only got that console window which eventually resulted in crap. So I used debuglog in B+ for ages, even in Bmax as I didn't dare using print.. :P


degac(Posted 2007) [#4]
Ok - I try to be more specific.

I dont' see any useful difference between print and debuglog (excluding the debug off option that affects the last one).
I would like to know if I can use any other debugger and how, as the help suggest

If there is no debugger present, this command is ignored.


I'm using happily the 'Print' method (I prefer to compile with non-GUI application option marked to 'see' what's happening - or write directly to a file the results...)- it's just for curiosity...


tonyg(Posted 2007) [#5]
You have misread the documentation.
The statement:

If there is no debugger present, this command is ignored.


means "If you do not have debug set". There is no 'other' debugger.
Debuglog statements are not compiled in release mode while Print statements are. You will have to either code a ?debug statement around the prints or take them out manually. That's why you would want to use debuglog rather than print.
You can write a profiler which helps debug. There is an example in the Code Archives.
Obviously there are the other debug commands available to you such as 'debugstop' and then stepin/stepout keys but Bmax Debugger is not fantastic/


degac(Posted 2007) [#6]
Ah! Ok - thanks!