justnobody
justnobody

Reputation: 327

About debug UI of visual studio

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?

Upvotes: 6

Views: 359

Answers (3)

Dialecticus
Dialecticus

Reputation: 16761

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.

Upvotes: 1

Vimal Raj
Vimal Raj

Reputation: 1038

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).

Upvotes: 0

Michael Burr
Michael Burr

Reputation: 340198

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.

Upvotes: 0

Related Questions