问题
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