June 26, 2024, 01:46:11 AM

News:

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


Running the debugger

Started by Arghwell, August 28, 2008, 02:56:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Arghwell

I am new to Emergence basic, but from what I've seen so far it's very good. But one problem I am having is with the debugger. On my latest program when I do a debug compile of the program all I get is a black screen and I have to turn the computer off to regain control. I suspect that I am doing something stupid (or not doing something I obviously should do) but I don't know what ! Any ideas/suggestions? :(




Ionic Wind Support Team

Just building a debug executable wouldn't cause it.  I suppose you mean you are trying to run the executable?

Debugging is covered in the users guide.  Use the STOP command to insert debugging breakpoints, and DebugPrint to show output from your program while the program is being run in debug mode.

After you build the debug executable use Build->debug->start to begin the debug session.

One thing to watch out for is full screen 2D or 3D programs, if you are debugging and get an error it can be difficult to get back to the IDE to see what has happened.  Use ALT-TAB to switch to it.

Paul Turley
Ionic Wind Software
Ionic Wind Support Team

Arghwell

Sorry - yes I did mean running the executable.

I now have a program (with a 2D screen) that compiles and runs with no problem, but if I add a STOP statement and do a debug compile and run it I loose control of my PC - all I have is a black screen + cursor. ALT-TAB brings up the program bar but none of the buttons work. I then have to cntl-alt-delete and stop the program running in order to return to the emergence basic IDE but when I get back into the IDE nothing works. I then have to close the IDE at which point I get a message saying that this will stop the debugger!

If I can get some sort of response or output I can usually figure out what is going on by trial and error but it's very difficult when faced with a blank screen. This is particularly annoying as I am sure its something 'obvious' as I am a newbie. Any suggestions as to how to proceed? I did read through the debug section in the manual but it didn't seem to shed any light on the matter.



Ionic Wind Support Team

As I mentioned above debugging full screen DirectX apps can be problematic.  Better to design using windowed mode first, and then switch to full screen once you have all the coding errors resolved.

This is the nature of DirectX when running in full screen exclusive mode.  I faced the same problem using Microsoft debuggers under C++ way back in the day.  The DirectX app takes exclusive mode of the screen and input devices, however when I use alt-tab, at least on my machine, I am able to get the task switcher to display, and select the compiler to view the error message.  It also helps to open a log file and write to it when doing something that might cause an exception.

Another technique that can help is to use the same screen resolution in the DirectX program you do in Windows. 

Paul Turley
Ionic Wind Software

Ionic Wind Support Team

Arghwell

That was quick! - Thanks - I will try doing what you suggested and get back to you - I think the screen resolution was different in th eprogram...