代码之家  ›  专栏  ›  技术社区  ›  BennoDual

IntelliTrace历史调试未跳入Click EventHandler

  •  0
  • BennoDual  · 技术社区  · 7 年前

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

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

    我已激活IntelliTrace事件收集。运行调试并单击按钮时,我会在IntelliTrace事件列表中看到相应的事件: enter image description here

    单击“激活历史调试”时,Visual Studio显示以下内容: enter image description here

    这个StackTrace: enter image description here

    为什么现在不能跳转到EventHandler Button\u Click()?

    1 回复  |  直到 7 年前
        1
  •  0
  •   Jack Zhai    7 年前

    (1) 请在工具下启用Microsoft symbol服务器->选项->调试->符号。

    (2) 选中“工具”->下的“启用.NET Framework源代码步进”和“启用源代码服务支持”;选项->调试。

    enter image description here

    (3) 在项目属性下->调试,禁用“启用Visual Studio宿主进程”选项,并启用“启用本机代码调试”选项。

    然后使用断点调试应用程序,查看结果。 enter image description here

    更新时间:

    intellitrace日志中的按钮单击事件与您认为的不同。它不是跟踪代码,而是跟踪表示框架。Intellitrace对事件处理程序一无所知。

    但是,您可以通过在事件处理程序中使用跟踪点来实现所需的功能。

    推荐文章