IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: Haim on November 07, 2006, 11:12:45 PM

Title: Debugging- what am I doing wrong?
Post by: Haim on November 07, 2006, 11:12:45 PM
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?
Title: Re: Debugging- what am I doing wrong?
Post by: Ionic Wind Support Team on November 08, 2006, 12:30:56 AM
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?

Title: Re: Debugging- what am I doing wrong?
Post by: Haim on November 08, 2006, 12:36:07 AM
Thanks!
Haim
Title: Re: Debugging- what am I doing wrong?
Post by: John S on February 12, 2007, 12:03:11 AM
How do you turn off the Debug process?  I ran the debugger once and now, it seems to stay on.
Title: Re: Debugging- what am I doing wrong?
Post by: Ionic Wind Support Team on February 12, 2007, 02:48:18 AM
Click on the 'hand'
Title: Re: Debugging- what am I doing wrong?
Post by: John S on February 12, 2007, 03:23:22 AM
thanks I did that.  I think the hand was originally greyed out, but now seems to stay on.