Visual Studio 断点窗口:TreeView 显示什么?

发布于 2024-09-14 07:45:56 字数 334 浏览 4 评论 0原文

通常,当在 Visual Studio(本例中为 2008)中使用断点时,我只会看到一个平面列表。但有时,我会得到每个断点的树视图,如下所示(展开节点有 26 个子节点)。所有树节点都引用同一行代码,并且所有可选列为每个节点显示相同的数据。我猜想它们可能与线程有关,但是它们有什么用处以及它们实际上显示了什么?如果它们有用,你应该如何区分它们?

断点窗口 http://www.freeimagehosting.net/uploads/2244242173.png

Usually when using breakpoints in Visual Studio (2008 in this example), I just see a flat list. Sometimes though, I get a tree-view for each breakpoint, as shown below (there are 26 child nodes of the expanded node). All the tree nodes refer to the same line of code, and all the optional columns display the same data for each node. I guess that they're possibly to do with threads, but what is the use of these and what do they actually show? And if they are of some use, how are you supposed to distinguish between them?

Breakpoints window http://www.freeimagehosting.net/uploads/2244242173.png

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

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

发布评论

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

评论(2

再见回来 2024-09-21 07:45:56

就我而言,它似乎与正在调试的进程中的 AppDomains 有关。如果我将 WinDbg 附加到进程,加载 SOS.dll 并运行 !DumpDomain,我可以看到 26 个 AppDomain,对应于问题中的 26 个树节点。如果“断点”窗口中有一列可以区分这些,那就太好了!

In my case, it seems to relate to the AppDomains in the process being debugged. If I attach WinDbg to the process, load SOS.dll and run !DumpDomain, I can see 26 AppDomains, corresponding to the 26 tree nodes in the question. It would be nice if there was a column in the Breakpoints window that would distinguish between these!

再浓的妆也掩不了殇 2024-09-21 07:45:56

这些被称为子断点,记录很少(12)并且通常有很多错误。

根据经验,对于本机代码,会形成子断点:

  1. 对于内联函数,实例化多次;
  2. 对于模板函数,实例化多次;
  3. 在与调试进程中的多个 DLL 链接的静态库中;
  4. 每当调试引擎感到无聊时。说真的,其中大多数看起来完全是假的。

These are called Child Breakpoints, are sparsely documented (1, 2) and are generally rather buggy.

Empirically, for native code child breakpoints are formed:

  1. For inlined functions, instantiated multiple times,
  2. For template functions, instantiated multiple times,
  3. In static libraries that are linked against multiple DLLs in the debugged process[es],
  4. Whenever the debugging engine feels bored. Seriously, most of them seem outright bogus.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文