在csharp崩溃期间获取行号 [英] get line number during crash in csharp

查看:102
本文介绍了在csharp崩溃期间获取行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我写了一个在WEB模式下运行服务器端的DLL

这个DLL是由一个包在内存模式下自动启动的,所以不需要考虑到附加的PDB文件

我得到一个错误,我知道方法而不是行号

我如何得到错误的行号?



我永远感谢那个给我小费的人!

提前谢谢



(ps:抱歉英文不好!我是法国人!)

Hello,
I wrote a DLL that runs server side in WEB Mode
This DLL is automatically launched by a package in "memory" mode and therefore does not take into account the PDB file which is attached
I get an error which I know the method but not the line number
How do I get the line number in error?

All my eternal gratitude to the one who finds me a tip!
thank you in advance

(ps: sorry for the bad English ! I am French !)

推荐答案

正如评论中所说,你或许可以得到堆栈跟踪中的行号。



但是,有一个问题。如果编译器内联函数或执行其他一些优化,问题可能不在您在跟踪中找到的行号。
As was said in the comment, you might be able to get the line number from the stack trace.

BUT, there's a problem. If the compiler in-lines functions or performs some other optimizations, the problem may not be at the line number you find in the trace.


这篇关于在csharp崩溃期间获取行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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