WPF Performance Suite Visual Profiler 不起作用

发布于 2024-09-04 01:21:52 字数 144 浏览 8 评论 0原文

我已经安装了最新的 Windows 7 SDK,其中包含 WPF Performance Profiler。

当我启动应用程序时,Perforator 确实显示一些数据,但 Visual Profiler 不显示任何内容。时间线移动但没有收集数据......

I have installed the latest Windows 7 SDK which contains the WPF Performance Profiler.

Perforator does display some data when I launch my app, but the Visual Profiler does not display anything. The timeline moves but not data is collected ...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

陌若浮生 2024-09-11 01:21:52

试试这个链接

适用于 WPF 4 的 WPFPerf 性能分析工具现已推出! 帖子中,我提到了一个错误导致 Visual Profiler 在某些时区不显示任何数据。
补丁现已可以解决此问题...

Try this Link

In the WPFPerf Performance Profiling Tools for WPF 4 is now available! post, I mentioned that a bug caused the Visual Profiler to not display any data in certain time zones.
A patch is now available to fix this issue...

一梦浮鱼 2024-09-11 01:21:52

首先检查它是否适用于小型空白 WPF 应用程序。如果它不能与空白 WPF 应用程序一起使用,则可能是已经提到的补丁 (WPF 4 的 WPF 性能分析工具的时区补丁现已推出)。

然而,就我而言,这不是问题。 Visual Profiler 有一个错误,如果它不喜欢主窗口标题栏中的某些字符,则会导致它不显示元素树。

经过数小时的反复试验,我能够追踪到为什么它无法在我们的应用程序上运行(尽管它可以在空白 WPF 应用程序上运行)的根本原因。原因是我们的应用程序的标题栏文本(商标)中有一个特殊字符。如果我们从主窗口标题中消除特殊字符,则在附加可视分析器时元素树会显示良好。我也能够在简单的空白 WPF 应用程序中重现此问题,只需将以下属性放在主窗口上即可:

<Window ..... Title="Test Application™" >

看起来像是 Visual Profiler 中的错误,以某种方式由特殊字符触发。我没有测试其他特殊字符,但很可能不仅仅是这个。

因此,解决方法是在分析时删除特殊字符,直到他们修复此问题。

First check to see if its working even with a small blank WPF application. If it is not working with a blank WPF app, then it likely is the patch already mentioned (TimeZone patch to WPF Performance Profiling Tools for WPF 4 is now available).

However, in my case that wasn't the issue. Visual Profiler has a bug that causes it not to display the Element tree if it doesn't like some of the characters in its main window title bar.

Through hours of trial and error, I was able to trace the root cause of why it would not work on our application even though it would on a blank WPF application. The reason is that our application has a special character in the title bar text (trademark). If we eliminate the special character from the main window title, the element tree shows fine when the visual profiler is attached. I was able to reproduce this issue in the simple blank WPF application too simply by putting the following property on the main window:

<Window ..... Title="Test Application™" >

Looks like a bug in Visual Profiler that somehow is triggered by special characters. I didn't test for other special characters, but likely it isn't just this one.

So the workaround is to remove the special character while you are profiling until they fix this.

站稳脚跟 2024-09-11 01:21:52

检查您是否使用的是 WpfPerf 4.0 版本。原来自带的SDK不支持.net 4

Check out if you are using the version 4.0 of WpfPerf. The original that comes with the SDK do not support .net 4

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文