当一个线程由于断点而冻结时,是否可以让其他线程继续运行 [英] Is it possible to have other threads continue to run when one thread freeze due to breakpoint

查看:24
本文介绍了当一个线程由于断点而冻结时,是否可以让其他线程继续运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对调试过程和调试器的理解是,当断点被击中时,所有其他线程都会被冻结.但是,我的一位同事说,此选项是可配置的,这意味着您可以在 Visual Studio 选项中的某处配置其他线程(没有断点的地方)继续正常工作,尽管带有断点的线程被冻结.我在 Visual Studio 中找不到任何此类设置,而且我的同事不记得他在哪里看到该设置,尽管他似乎非常确信此选项存在.

my understanding about debugging process and debuggers is that when a breakpoint gets hit, all other threads gets frozen. However one of my colleague said that this option is configurable meaning that somewhere in Visual Studio options you can configure that other threads (where there is no breakpoint) continue to work as normal although the thread with breakpoint get frozen. I couldn't find any such settings in visual studio plus my colleague does not remember where he saw that setting although he seem pretty confident that this option exists.

有人可以确认是否有可能在一个线程由于断点而被冻结时让其他线程运行?另外,如果有这样的设置,请告诉我在哪里可以找到它.

Can someone confirm if its even possible to have other threads running while one thread gets frozen due to breakpoint? Also if there is such a setting, please let me know where to find it.

推荐答案

当断点命中时,调试器总是冻结所有线程.但是,当您按 F5 继续执行时,您确实可以控制线程发生的情况.您可以使用 Debug + Windows + Threads 调试器窗口中可用的 Freeze 工具栏按钮来阻止线程在按 F5 时继续运行.使用 Thaw 按钮重新启用它.

The debugger always freezes all threads when a breakpoint hits. You have however do have control over what happens to threads when you press F5 to continue execution. You can use the Freeze toolbar button available in the Debug + Windows + Threads debugger window to prevent a thread from continuing when you press F5. Use the Thaw button to re-enable it.

这篇关于当一个线程由于断点而冻结时,是否可以让其他线程继续运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆