7

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.

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.