Page 1 of 1
'Debug' support multiple arguments
Posted: Sat Apr 21, 2007 4:39 pm
by Killswitch
Simple request really, nothing that important:
Allow:
to be:
Posted: Sat Apr 21, 2007 5:41 pm
by Kaeru Gaman
not a bad idea.
I suggest something like the formatting of print-lines in C64-Basic:
the comma is a tabulator, for direct following is the ";"
will debug the variables directly behind the text, but set the second text on the next tabstop.
Posted: Sat Apr 21, 2007 8:45 pm
by AND51
Sorry, but IMHO both ideas are not good.
; is for comments and should always be ONLY for comments (expect if you use it in strings).
"Debug 1, "abc", 18.9 " is also a bad idea, because Debug expects 2 Params:
So the compiler cannot decide if param 2, 3, 4, etc. must be debugged or should be the debug-level.
A better idea would be to invent a new command:
MultiDebug
MultiDebug should ignore the debug-level (and debug always!) then and should have this syntax:
Posted: Sun Apr 22, 2007 3:00 pm
by Kaeru Gaman
> ; is for comments and should always be ONLY for comments
that's right, it was only an example how it was used on the C64.
if there will be an seperator for the output, it maybe worth thinking about different separators for formatted output.
the debug-level parameter is a point, I just forgot that, because I never used it and never seen it been used....
> A better idea would be to invent a new command: MultiDebug
not at all. I think an additional command would be complete nonsense.
Posted: Sun Apr 22, 2007 3:15 pm
by Derek
Would this work..
You can always open a console and instead of using debug commands use printn() instead.
Wrap the printn() commands with a compilerif endif and turn the whole thing into a macro so that all you have to put in your code is something like
newdebug("print me")
you would get tabulated output and when you want to compile the finished program just set it so the compilerif doesn't produce any code and your done.
Posted: Sun Apr 22, 2007 4:58 pm
by AND51
> the debug-level parameter is a point, I just forgot that
I never used it, and trotzdem have I dran gedacht
> an additional command would be complete nonsense
You know that there were new debug commands? StepOver, etc.? OK, if you think they are complete nonsense...
I don't think that this will be bad in aany way.
> Would this work..
No, this woulnd't work. Why? If there is an error like an IMA (invalid memory access), then the whole program is terminated. So you console will be closed. Your Debug output is futsch then.
Posted: Sun Apr 22, 2007 6:39 pm
by Derek
Does the normal debugger survive an ima then, probably yes.
Oh well, it was just an idea for a way to get proportional output anyway.

Posted: Sun Apr 22, 2007 6:43 pm
by AND51
In 99.999999999999% cases I use the integrated debugger. It disappers very often when there is an IMA, Div 0, etc...
So I've got no chance to get the debug output when there is an error.
Posted: Sun Apr 22, 2007 6:51 pm
by Kaeru Gaman
I agree, a "debugger" should be an extra-program.
I also often use integrated debugging, especially DrawText() on a screen...
it's just....
meanwhile the debugger could be extended, and additional possibilities for the output together with charset-settings would be a good point imho...