Programming => Bugs & Feature Requests => Topic started by: pber on March 21, 2015, 10:00:56 PM
Title: err messages in console
Post by: pber on March 21, 2015, 10:00:56 PM
Hi all, hello Charles how are you?
Does exist a way to be notified about erros not with MsgBox'es?
thanks
Title: Re: err messages in console
Post by: Charles Pegge on March 22, 2015, 02:08:48 AM
Hi Paolo,
I am emerging from hibernation in the spring sunshine. How are you? :)
The -m switch diverts error messages to the console
You can compile from the command prompt:
gxo2 -m t.o2bas
to capture error messages in t.txt:
gxo2 -m t.o2bas>t.txt
Title: Re: err messages in console
Post by: pber on March 22, 2015, 03:20:08 AM
thanks, and I'm quite fine.
Something I never asked (but I know the answer: you are too comfort between hex numbers):
does exist some tool for debugging o2 code (apart printing and olly2)?
Title: Re: err messages in console
Post by: Charles Pegge on March 22, 2015, 03:48:42 AM
No, do you have any ideas on what debugging tools would be useful?
The main problem with low-level debugging, is generating too much data, but tracing with the console (print printl) might give you more flexibility than relying on single-shot message boxes.
Title: Re: err messages in console
Post by: pber on March 22, 2015, 05:48:02 PM
I understand machine code, but i'm totally ignorant about windows low-levels, assembly conventions, tecniques and what else. So the low-lev debugger is totally useless to me, unless... there is a way to deduce the source position of a sequence of mc instructions?
maybe processing the oil source before the runtime?
or just interleaving some marks in the basic source code, that magically get transfered as mc intructions?
Title: Re: err messages in console
Post by: Charles Pegge on March 22, 2015, 08:19:37 PM
I have no experience of debugging tools myself. I use print statements and commenting-out, as the main means of trapping a bug. It works in any language, even in assembly code, as long as the registers are preserved on the stack.
Code: OxygenBasic
mov eax,4
mov ecx,100
imul eax,ecx
pushad : print eax : popad
add eax,40
pushad : print eax : popad
such print statements can be condensed into a macro