[英]How to Debug .net applications without Visual Studio
Please let me know if this has been asked before, I wasn't able to find any questions on this subject:- 如果之前有人询问过,请告诉我,我无法就此问题找到任何问题: -
I need to determine the inner exception of an exception thrown on a computer with the .net framework installed but not Visual Studio (nor is it possible to install Visual Studio on the computer). 我需要确定在安装了.net框架但不是Visual Studio的计算机上抛出的异常的内部异常(也不可能在计算机上安装Visual Studio)。 How can I examine this inner exception?
我该如何检查这个内部异常?
Note a few points: 注意几点:
Thanks! 谢谢!
Have you had a look at MDBG ? 你看过MDBG了吗? It may take you a while to get around but is fairly straight forward.
您可能需要一段时间才能到处走走,但相当直接。
Also DbgClr may be an option, I think its still supposed to be in the SDK somewhere. 此外, DbgClr可能是一个选项,我认为它仍然应该在某个地方的SDK中。
It is actually fairly simple to do this with WinDbg if you have a crash dump. 如果您有崩溃转储,使用WinDbg执行此操作实际上非常简单。 Load the dump into WinDbg, load sos, and run the printexception command.
将转储装入WinDbg,加载sos,然后运行printexception命令。
>.load sos
>!printexception
This will tell you the exception as well as point you to the inner exception. 这将告诉您异常以及指向内部异常。 Output will be something like:
输出将是这样的:
0:000> !printexception
Exception object: 0135b340
Exception type: System.ApplicationException
Message: GetAverage failed
InnerException: System.IndexOutOfRangeException, use !PrintException 01358394 to see more
<stack trace follows>
If you don't have a memory dump already, you can create one using adplus (which comes with WinDbg). 如果您还没有内存转储,可以使用adplus(WinDbg附带)创建一个内存转储。
>adplus -crash -o<dump location> -quiet -pn<name of process>
If you prefer to use PID use the -p
option instead. 如果您更喜欢使用PID,请使用
-p
选项。
您可以使用远程调试: http : //msdn.microsoft.com/en-us/library/y7f5zaaa.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.