IntelliTrace 历史调试不会在 Click

编程入门 行业动态 更新时间:2024-10-25 16:22:38
本文介绍了IntelliTrace 历史调试不会在 Click-EventHandler 中跳转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我创建了一个带有一个按钮和一个标签的小型 WPF 应用程序.Button 的 Click-Eventhandler do

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;
} 

我已激活 IntelliTrace 事件收集.当我运行调试并单击按钮时,我会在 IntelliTrace-Event-List 中看到相应的事件:

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:

当我单击激活历史调试"时,Visual Studio 显示以下内容:

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

和这个 StackTrace:

and this StackTrace:

为什么我现在不能跳转到 EventHandler Button_Click()?

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

推荐答案

(1) 请在 TOOLS->Options->Debugging->Symbols 下启用 Microsoft 符号服务器.

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

(2) 在 TOOLS->Options->Debugging 下勾选Enable .NET Framework source stepping"和Enable source serve support".

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

(3) 在你的项目属性->Debug下,禁用启用Visual Studio托管进程"选项,启用启用本机代码调试"选项.

(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.

更新:

intellitrace 日志中的按钮点击事件并不是你想象的那样.它不是在跟踪您的代码,而是在跟踪表示框架.Intellitrace 对事件处理程序一无所知.

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.

这篇关于IntelliTrace 历史调试不会在 Click-EventHandler 中跳转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-27 04:33:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1148587.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:会在   历史   IntelliTrace   Click

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!