Board index » cppbuilder » Why the de{*word*81} suddenly runs when stepping

Why the de{*word*81} suddenly runs when stepping

I recall seeing a post here a while back (I couldn't find it) about a
problem with the de{*word*81} suddenly taking off to somewhere else in the code
when stepping. This just happened to me a little while ago, and at first I
was baffled, but then I figured out why. An exception was being thrown, and
the de{*word*81} wasn't stepping into the exception handler. Instead, it would
resume execution somewhere further along in the code. The resumed point of
execution appears to be correct, although it has skipped over a bunch of
code, and it's probably picking up after blowing completely out of the stack
frame and maybe even into a subsequent Windows message. I think it would
help debugging a lot if the de{*word*81} would actually step into the exception
handler, even if it has to jump back several frames. A step should not be
skipping that much code. If you run and hit an exception, it stops and puts
up a message so you can debug from that point (depending on the de{*word*81}
settings), and I would expect it to do the same thing when stepping. The
other thing about the code I was debugging is that it was throwing the
exception in an inline class function, which was actually a few levels deep.
IOW, an inline called an inline which called another inline, etc. I don't
know if that makes any difference but it might.

    - Bill

--
----------------------------------------------------------------
Bill Zitomer
R.I. Soft Systems - http://www.risoftsystems.com
ScreenSaver.com - http://www.screensaver.com
Screen Greetings - http://www.screengreetings.com
Virus Myths - http://www.vmyths.com

 

Re:Why the de{*word*81} suddenly runs when stepping


Quote
Bill Zitomer wrote:

> I recall seeing a post here a while back (I couldn't find it) about a
> problem with the de{*word*81} suddenly taking off to somewhere else in the code
> when stepping. This just happened to me a little while ago, and at first I
> was baffled, but then I figured out why. An exception was being thrown, and
> the de{*word*81} wasn't stepping into the exception handler.

Uncheck the box that allows the IDE to handle exceptions. (Rash
presumption, you have exception handlers in your code.)

Bob ;-)

Re:Why the de{*word*81} suddenly runs when stepping


Quote
> Uncheck the box that allows the IDE to handle exceptions. (Rash
> presumption, you have exception handlers in your code.)

I know about that (there's actually 2 boxes), but will that stop the
de{*word*81} from jumping ahead in the code? Usually for debugging I find it
helpful to let it break on an exception so I can see what happened and fix
it (assuming it's a bug in the code that needs to be fixed). I didn't think
to try turning this option off.

    - Bill

--
----------------------------------------------------------------
Bill Zitomer
R.I. Soft Systems - http://www.risoftsystems.com
ScreenSaver.com - http://www.screensaver.com
Screen Greetings - http://www.screengreetings.com
Virus Myths - http://www.vmyths.com

Re:Why the de{*word*81} suddenly runs when stepping


Quote
Bill Zitomer wrote:

> > Uncheck the box that allows the IDE to handle exceptions. (Rash
> > presumption, you have exception handlers in your code.)

> I know about that (there's actually 2 boxes), but will that stop the
> de{*word*81} from jumping ahead in the code? Usually for debugging I find it
> helpful to let it break on an exception so I can see what happened and fix
> it (assuming it's a bug in the code that needs to be fixed). I didn't think
> to try turning this option off.

I was thinking that if it was an exception that the IDE was catching,
that might explain why it goes to some place you don't expect. If it
has to go to one of your own 'catch' blocks, at least it would make
sense ...

Bob ;-)

Re:Why the de{*word*81} suddenly runs when stepping


Quote
"Bill Zitomer" <bzito...@risoftsystems.com> writes:
> I recall seeing a post here a while back (I couldn't find it) about a
> problem with the de{*word*81} suddenly taking off to somewhere else in the code
> when stepping.

I agree with your expectations.  It should stop in catch blocks that
are at the same level or higher in the callstack to the call to the
function that throws.

I've submitted this as a bug/feature request.

--
Chris (TeamB);

Other Threads