抓了一个dump包,想用windbg分析一下,但是使用!clrstack的时候提示:
Unable to walk the managed stack. The current thread is likely not a
managed thread. You can run !threads to get a list of managed threads in
the process.
该命令只能分析托管代码,对于.net core 程序使用哪些命令分析?
最佳答案:stackoverflow 上的回答:
You can type !pe to get the exception or ~#s to switch to the faulted thread. !clrstack should work then.
~#s 是切换到某个线程上,然后用!clrstack分析。还是会出现如上错误提示。
@Impossible: 那试试 ~*e !clrstack
@dudu: 通过这个命令我抓取一个异常信息:我现在的做法是,_Layout.cshtml Shared模板,在_Layout.cshtml上通过Html.RenderPartialAsync调用Left.cshtml(方法直接写在了视图上,因为我发现直接写在控制器的话得到的所有对象都是空!)