views:

220

answers:

3

I have a problem with my Visual Studio installation. When I got an exception I always have incorrect line numbers in it's stack trace. There are always point to last line of each method in my codebase. At the same time it's OK when I'm tracing programs with debugger. What's happed with PDBs?

No, I'm not re-throwing exception at each method.

In each line of stack trace I have last row of corresponding method, while exception had thrown by statement in the middle.

A: 

Could be wrong but the exection stack is showing the last completed step. The current step has not completed. The Debugger is showing the currently executing step.

Craig
A: 

Just to verify: you're not re-throwing the exceptions in those methods?

hometoast
+1  A: 

Sounds like you're running your app in Release mode. Release mode has difficulties with line numbers for exceptions and whatnot.

Compile your app in Debug mode (no need to attach the debugger) and see if it sorts itself out.

Matt Jacobsen