如何使 Visual Studio 调试器在设置为运行宏并继续的数据断点处停止中断?

发布于 2024-07-07 12:19:31 字数 268 浏览 5 评论 0 原文

我在使用 Visual Studio 2005 时遇到了一个奇怪的问题:我有一个数据断点,该断点被设置为运行宏并继续(也就是说,我选择一个宏并选中“继续执行”。)

现在,当数据断点(实际上是跟踪点)中的值发生变化,我首先收到一个消息框,通知我已命中断点,并且宏仅在我点击“确定”后运行。

我正在调试的代码对时间敏感,因此这使得无法调试。 有没有办法禁用弹出的消息框?

回应评论:宏本身可以为空,也可以是任何 Microsoft 提供的示例宏 - 这没有什么区别。

I'm running into an odd problem with Visual Studio 2005: I have a data breakpoint that's set to run a macro and continue (that is, I select a macro and check Continue Execution.)

Now, instead of silently running the macro when the value in the data breakpoint (tracepoint, really) changes, I first get a message box informing me that the breakpoint was hit, and the macro runs only after I hit OK.

The code I'm debugging is timing sensitive, so this makes it impossible to debug. Is there a way to disable the message box that pops up?

In response to comments: The macro itself can be empty, or it can be any of the Microsoft provided sample macros - it doesn't make a difference.

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

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

发布评论

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

评论(2

我们只是彼此的过ke 2024-07-14 12:19:31

它也为我做到这一点。 根据您设置“继续执行”选项的方式,该行为确实看起来有些不同,所以我怀疑这种行为(尽管很痛苦)可能是设计使然。 或者它可能是一个错误,但无论哪种情况你都可能被卡住。

另一种方法可能是使用 Windbg 或其他 Windows 调试工具,还支持数据断点。 它们需要一些时间来适应,并且不像 Visual Studio 调试器那样用户友好,但它们非常强大。 “ba”命令创建一个数据断点,您可以对调试器进行编程,以在命中断点时执行特定命令。 本文提供了有关这些调试器的一些很好的介绍性信息,并且问答 接近结尾的部分有一个示例,说明如何在命中面包点时执行操作。

It does this for me as well. The behavior does seem somewhat different based on how you set the "Continue execution" option, so my suspicion is that this behavior (painful as it is) may be by design. Or it may be a bug, but in either case you may be stuck.

An alternative might be to use windbg or one of the other Windows debugging tools, which also support data breakpoints. They take a bit of getting used to and are not nearly as user-friendly as the Visual Studio debugger, but they're pretty powerful. The "ba" command creates a data breakpoint, and you can program the debugger to perform a particular command when the breakpoint is hit. This article has some good introductory information about these debuggers, and the Q & A section near the end has an example of how to perform an action when a breadpoint is hit.

断爱 2024-07-14 12:19:31

我的机器上没有 vs.net 2005。
所以,我在这里推测。

执行行是什么?

它是否试图评估房产?
读取属性时是否设置了条件断点? (即在读取属性时中断?)

尝试删除与当前执行行相关的其他断点并再次添加跟踪点。

I do not have vs.net 2005 on my machine.
So, I am speculating here.

What is the line of execution?

Is it trying to evaluate a property?
Is a conditional breakpoint set when the property is read? (i.e. break when property is read?)

Try removing other breakpoints related to the current line of execution and add tracepoint again.

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