global sub main()
{
openconsole();
#break
setconsoletitle("debug test");
do{}until getkey()<>"";
closeconsole();
}
This very simple bit of code, compiled in debug mode, crashes when I 'compile and run' it (with F8).
When I compile it in normal mode (not in debug mode), it runs properly.
It also runs OK when compiled in debug mode, if I comment out the #break instruction.
I encountered this while trying to learn debugging in Aurora
What am I doing wrong?
Any chance for having a debugging tutorial?
Build->Debug->Start (F9)
Is the only way to run a debug build. You can't execute an executable with #break statements in it. So you build the debug executable first and then start the debug session. It was the same with the IBasic Pro debugger.
#break inserts the assembly instruction 'int 3'. Which tells the OS to transfer control to the debugger. If there is no debugger running that executable the OS puts up a message box, which is Windows way of telling you you ran the executable directly.
Build->Debug->Start starts the debugger which then runs your executable under its control.
You can also click the "debug start/continue" button on the toolbar. Its the bug with the line through it, 5th one from the right.
Clear enough?
Thanks!
Haim
How do you turn off the Debug process? I ran the debugger once and now, it seems to stay on.
Click on the 'hand'
thanks I did that. I think the hand was originally greyed out, but now seems to stay on.