IntelliTrace Historical Debugging does not jump in Click-EventHandler

≯℡__Kan透↙ 提交于 2019-12-24 20:42:33

问题


I have created a small WPF-Application with one Button and a Label. The Click-Eventhandler of the Button do

private void Button_Click(object sender, RoutedEventArgs e) {
    var s = this.Height;
    this.lbl.Content = s;
} 

I have activated IntelliTrace Event collecting. When I run debug and click on the Button, I see in the IntelliTrace-Event-List the corresponding events:

When I click on "Activate Historical Debugging" Visual Studio shows the following:

and this StackTrace:

Why can I not jump to the EventHandler Button_Click() now?


回答1:


(1) Please enable the Microsoft symbol servers under TOOLS->Options->Debugging->Symbols.

(2) Check "Enable .NET Framework source stepping" and "Enable source serve support" under TOOLS->Options->Debugging.

(3) Under your project properties->Debug, disable the option "Enable the Visual Studio hosting process", and enable the option "Enable native code debugging".

And then debug your app with breakpoint, view the result.

Update:

The button click event in the intellitrace log is not what you thinks it is. It’s not tracing your code, it’s tracing the presentation framework. Intellitrace knows nothing about the event handler.

However, you can achieve what you wants by using a tracepoint in your event handler.



来源:https://stackoverflow.com/questions/49796916/intellitrace-historical-debugging-does-not-jump-in-click-eventhandler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!