为什么我的异常堆栈踪迹始终指向最后一个方法行? [英] Why do my exception stack traces always point to the last method line?

查看:186
本文介绍了为什么我的异常堆栈踪迹始终指向最后一个方法行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的Visual Studio安装问题。当我得到了一个例外,我总是有不正确的行号,在它的堆栈跟踪。总有一些点在我的codeBase的每个方法的最后一行。同时,它的确定,当我与跟踪调试程序。什么是发梗与PDBS?

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.

推荐答案

听起来你正在运行在发行模式下的应用程序。发行方式与例外和诸如此类的东西行号的困难。

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.

这篇关于为什么我的异常堆栈踪迹始终指向最后一个方法行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆