Intellitrace 捕获断点事件而不实际停止程序执行

发布于 2024-11-06 07:37:44 字数 385 浏览 0 评论 0 原文

我喜欢如何将断点捕获为 Intellitrace 事件。断点很容易添加/启用/禁用,并且可以在运行时添加/删除(与控制台事件相反)。

但是,断点当然会停止执行流程,在调试正在运行的应用程序时,我必须不断地按 F5 F5 F5 F5 F5 F5。我希望能够捕获 intellitrace 中的断点事件,并让代码执行而不实际中断断点。

我还使用 Console 语句作为捕获的 intellitrace 事件,但添加断点要容易得多(F9 而不是在任何地方粘贴 Console.WriteLine("...") ),并且我可以添加并在运行时禁用新断点,而如果我想在运行时添加或删除基于控制台的事件,我必须停止程序,添加/删除,然后重新启动。

有没有什么好的方法可以以这种方式捕获智能事件?

I like how you can capture breakpoints as Intellitrace events. Breakpoints are easy to add/enable/disable, and can be added/removed at runtime (as opposed to say Console events).

However, of course breakpoints stop the flow of execution, and I have to press F5 F5 F5 F5 F5 F5 constantly while I debug the running application. I'd love to be able to capture breakpoint events in intellitrace and just let the code execute without actually breaking on the breakpoints.

I've also used Console statements as captured intellitrace events, but breakpoints are much easier to add (F9 as opposed to pasting a Console.WriteLine("...") everywhere), and I can add and disable new breakpoints at runtime, whereas if I want to add or remove a Console based event at runtime, I have to stop the program, add/delete, and restart.

Are there any good ways to capture intellitrace events in this way?

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

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

发布评论

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

评论(1

辞取 2024-11-13 07:37:44

我认为这就是您正在寻找的:

http://geekswithblogs.net/sdorman/archive/2009/02/14/visual-studio-2008-debugging-tricks-ndash-advanced-breakpoints.aspx

基本上,你可以使用高级断点来做许多不同的事情。在您的情况下,您可能希望使用仅提供命中计数的跟踪点。在其他情况下,您可能希望指定断点仅在一定次数的命中后发生(也许您希望确保循环不是无限的)。

Visual Studio 在断点选项中具有大量出色的功能。我确信,即使上述选项没有解决您的问题,上述文章中仍然包含一些内容可以解决您的问题。

I think this is what you are looking for:

http://geekswithblogs.net/sdorman/archive/2009/02/14/visual-studio-2008-debugging-tricks-ndash-advanced-breakpoints.aspx

Basically, you can use an advanced breakpoint to do a number of different things. In your case, you would probably want to use the tracepoint that simply gives a hit count. In other cases, you might want to specify that the breakpoint only occurs after a certain number of hits (maybe you want to be sure a loop isn't infinite).

Visual Studio has a ton of great features inside of the breakpoint option. I'm sure that even if the above option didn't solve your problem that there is still something that is included in the above article that will solve your problem.

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