May 01, 2024, 04:54:35 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Debugging- what am I doing wrong?

Started by Haim, November 07, 2006, 11:12:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Haim

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?

Ionic Wind Support Team

November 08, 2006, 12:30:56 AM #1 Last Edit: November 08, 2006, 12:35:19 AM by Paul Turley
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?

Ionic Wind Support Team

Haim


John S

How do you turn off the Debug process?  I ran the debugger once and now, it seems to stay on.
John Siino, Advanced Engineering Services and Software

Ionic Wind Support Team

Ionic Wind Support Team

John S

thanks I did that.  I think the hand was originally greyed out, but now seems to stay on.
John Siino, Advanced Engineering Services and Software