在Visual Studio调试器中断开线程创建 [英] Break on thread creation in Visual Studio debugger
问题描述
(请注意,这不同于在其他问题中要求的打开上下文切换: http://stackoverflow.com/questions/3048064/can-i-set-a-breakpoint-in-visual-studio-c-to-break-on-a-thread-context-switch )
我找到了一种方法。而谷歌搜索我看到了相反的问题:
是否可以在线程退出时使用特定的错误代码?
我在函数中放置了一个断点RtlExitUserThread
之后,我意识到所有线程正在使用函数 RtlUserThreadStart
创建,所以将另一个断点放在该函数中,这就是:)
Can I set the Visual Studio debugger to break on thread creation?
(Note this is not the same as breaking on context switch as asked for in this other question: http://stackoverflow.com/questions/3048064/can-i-set-a-breakpoint-in-visual-studio-c-to-break-on-a-thread-context-switch)
I've found a way to do it. While googling I saw the opposite question: Is it possible to break on thread exit with specific error code?
I put a breakpoint at the function RtlExitUserThread
, after that I realized that all threads was creating with the function RtlUserThreadStart
, so put another breakpoint to that function and that's all :)
这篇关于在Visual Studio调试器中断开线程创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!