在哪里可以找到查看内存中对象的工具?

发布于 2024-09-30 03:43:17 字数 107 浏览 1 评论 0原文

我正在寻找一个可以告诉我有关我的对象的工具。我想查看哪些对象已实例化、准备好进行 GC 等。我意识到我可以测试每个对象,但我更喜欢应用程序的整体视图。这将用于故障排除。

有什么建议吗?

I'm looking or a tool that can tell me about my objects. I'd like to see which objects are instantiated, ready for GC, etc. I realize I could test for each object but I'd prefer an overall view of my application. This would be used for troubleshooting.

Any suggestions?

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

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

发布评论

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

评论(6

茶花眉 2024-10-07 03:43:17

我想说这取决于您使用该工具的频率。 WinDbg + SOS 可以让您完成您所要求的所有任务,甚至更多,但是它有一个漫长而陡峭的学习曲线。它非常强大,因为它可以让您检查应用程序的托管部分和本机部分,但需要一些时间来适应。 WinDbg 是免费的,SOS 附带 .NET Framework。有关其他选项,请查看 PSSCor2 和 SOSEX.dll。

另外,还有一些商业替代方案可能会给您带来更流畅的体验。我喜欢 ANTS Memory Profiler,但是 .NET Memory Profiler 也非常好。

I would say that it depends on how often you're going to use the tool. WinDbg + SOS lets you do all you're asking and more, but it has a long and steep learning curve. It is very powerful as it will let you inspect both managed and native parts of your applicaiton, but it takes some getting used to. WinDbg is free and SOS comes with the .NET Framework. For additional options check out PSSCor2 and SOSEX.dll as well.

Alternatively there are a couple of commercial alternatives that will probably give you a much smoother experience. I like ANTS Memory Profiler, but .NET Memory Profiler is also really nice.

卷耳 2024-10-07 03:43:17

您需要一个 分析器(JetBrains dotTrace 和 Redgate ANTS 是特别好的商业分析器)。

You need a profiler (JetBrains dotTrace and Redgate ANTS are particularly good commercial profilers).

烟燃烟灭 2024-10-07 03:43:17

在这种情况下,首要的解决方案是使用 Son of Strike ( SOS)扩展。请参阅 MSDN。

关于使用 WinDbg 进行托管调试的概述,Tess 的博客 是一个非常好的资源。

编辑
如果您有兴趣查看与垃圾收集相关的对象引用,这篇文章 特别有趣。

The premier solution in this case in WinDbg with the Son of Strike (SOS) extension. See MSDN.

As for an overview of managed debugging with WinDbg, the blog of Tess is a very good resource.

Edit:
If you are interested in seeing object references as they are related to garbage collection, this post is especially interesting.

夏夜暖风 2024-10-07 03:43:17

这篇最近的文章,Ayende 写了关于 dotTrace 的文章。
看来这可能是您正在寻找的东西。

In a this recent post, Ayende wrote about dotTrace.
It looks like this might be something you're looking for.

2024-10-07 03:43:17

我会说 CLR Profiler,但我认为它没有更新对于 4.0

I would say CLR Profiler, but I don't think its been updated for 4.0

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