VSTO 应用程序的代码分析
我正在寻找一个免费的代码分析器(性能分析器,而不是内存分析器),它适用于 VSTO 应用程序(特别是我的情况下的 Excel,但我认为如果它适用于一个应用程序,它应该适用于所有应用程序)。
我已经尝试过 Eqatec Profiler,但它似乎无法从探查器启动应用程序(“运行应用程序”按钮呈灰色,我收集的原因是 VSTO 应用程序被编译到与 Excel 一起在进程中运行的 dll 中) 。EXE文件)。
如果有人成功使用 Eqatec 或其他免费代码分析器来分析 VSTO 应用程序,我很想听听您是如何做到的。
I'm looking for a free code profiler (performance profiler, not a memory profiler) which works for VSTO applications (specifically Excel in my case, but I gather that if it works for one, it should work for all).
I have tried Eqatec Profiler, but it can't seem to launch the application from the profiler (The Run app button is greyed out, which I'm gathering is because the VSTO application is compiled into a dll which runs in-process with Excel.exe).
If anyone has successfully used Eqatec or another free code profiler to profile a VSTO application, I'd be interested to hear how you did it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在做的事情应该可以通过 EQATEC Profiler 实现。
当您只是检测一个或多个 DLL 时,就没有明显的“要运行的应用程序”:您只是拥有一些检测过的 DLL,但探查器不知道您打算以何种方式使用它们。
但是,检测的程序集(以及运行时模块 EQATEC.Profiler.RuntimeFullNet.dll)始终完全“独立”,这意味着一旦使用其中的方法,它们就会自行执行计时。因此,您只需让 VSTO 应用程序像往常一样加载 DLL,瞧,DLL 本身将开始积累计时信息并开始侦听来自探查器的连接,然后您可以使用该连接来拍摄快照等。
总结一下:
我希望这会有所帮助。如果没有,请告诉我。
What you're doing should be possible with EQATEC Profiler.
When you're simply instrumenting one or more DLLs then there is no distinct "application to run": you simply have some instrumented DLLs, but the profiler doesn't know in what way you intend to use them.
However, the instrumented assemblies are (along with the runtime-module, EQATEC.Profiler.RuntimeFullNet.dll) always completely "self-contained", meaning that they perform the timing themselves as soon as the methods within them are used. So you simply need to have your VSTO app load the DLL as usual and voila, the DLL will itself start accumulating timing information and start listening for a connection from the profiler with which you can then take snapshots etc.
So to summarize:
I hope this helps. If not then let me know.
您是否尝试过 Microsoft 的CLR Profiler?
我已经多次使用它并取得了巨大的成功。
Have you tried Microsoft's CLR Profiler?
I have used it with great success many times.