October 30, 2025, 07:38:13 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Single Stepping Code

Started by pm620wh, September 16, 2009, 11:20:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pm620wh

Hi Everyone

I've recently adopted Emergence Basic for development (moved across from Visual Studio).  I have a few questions and wondered if someone could help.  When single stepping code, if I place the stop statement inside a do-loop, on the second iteration, I start to recieve errors in the debug window similar to:

Starting debug session...
User breakpoint encountered: Address 0x004072B1
First chance exception: Address 0x0040757D Access Violation.
Final chance exception: Address 0x0040757D Access Violation.
First chance exception: Address 0x0040757D Access Violation.
Final chance exception: Address 0x0040757D Access Violation.
First chance exception: Address 0x0040757D Access Violation.
Final chance exception: Address 0x0040757D Access Violation.

Is there something I am doing wrong, is it not possible to step round a loop watching variables.

Any guidance woudl be greatly appreciated.

Kind regards

Paul

LarryMc

Seems like there are some commands? that work fine but will throw First Chance exceptions.
And that's the extent of my knowledge in that area.

Some of the other guys will be able to help you better.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ficko

Hi pm620wh,

There seems to be a "little" bug the "eip" points to the 2 byte of the "int 3" command.

Use


_asm
db 0xcc
_endasm


instead of "STOP" and you can move over the breakpoint with "continue".

Regards,
Ficko

pm620wh

Hey Ficko

Thank you for the prompt response and workaround!!

Regards

Paul

ZeroDog

Personally, I never use debug mode at all.  I just put a messagebox where I want to peek at the variables in question, and print them in the messagebox... but thats just me..

LarryMc

That's what I do sometimes also,ZD.
I usually just put in print statements and print to the console window(after I open it).

About the only time I use debug is when I get GF crashes.  If it will run in debug then I know I've got a string problem. (at least that has always been the case in the past).

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library