views:

63

answers:

3

alt text

When an exeption dialog pops up,which line actually has/triggers the problem, the line hinted by green arrow or the line above?

Is there any official reference for this corner case?

UPDATE

So far it still seems that both are possible.Can anyone come up with a final conclusion?

A: 

Here is the microsoft reference links for Visual Studio Debugging UI

Debugging UI Reference VS.Net 2008

Using the Debugger : a Roadmap

This Link from the msdn Magazine says that the current stack frame is indicated by a green curved tail arrow (while the active stack frame retains the yellow arrow).

Vimal Raj
There seems no remark on this though.
justnobody
Isn't the current frame and the active frame the same thing?
justnobody
It can be different. See the blogpost of a former MVP http://www.danielmoth.com/Blog/Active-And-Current-Stack-Frame-And-Thread.aspx . He has detailed about stackframes and threads.
Vimal Raj
Then does the graph in my question means the problem is triggered by the active frame or current frame?
justnobody
A: 

I don't know if there's an official documented statement on this, but for me it seems to point to the line that triggered the exception.

But I wouldn't be too surprised if in some more complex situations (or if a release build is being debugged) that the debugger might get a bit confused and point to the incorrect location. I'd imagine that if that happens for a debug build, MS would consider it a bug, and might even fix it if reported in a reproducible scenario.

Michael Burr
But IIRC,the green arrow points to the next statement **to be executed** in other cases,which is not already run.
justnobody
But if a statement caused an exception, then it hasn't been successfully run. However, you certainly could be right that I'm forgetting some exception(s) that are handled specially for some reason. Also, there are settings which affect *when* the debugger will present an exception to you - either when it's first thrown or only if uncaught after having run though all the possible handlers. Though it should still present these on the same line.
Michael Burr
Forgot to mention that `FlashPlayer.exe` is adobe's product, not built from the project which contains the source above.Do you have any other idea with this in mind?
justnobody
A: 

If you go to assembly window you will see exactly at what machine instruction the code is. If it is immediately after some call instruction then the exception happened inside that call.

Dialecticus