我使用VS2017来调试我的C ++应用程序。但是,当我使用单步调试时,它会自动切换到某个线程,我只想调试一个特定的线程。我怎么能这样做?
断点
您可以配置VS2017调试器以仅过滤特定线程。按照this msdn博客申请一个断点。您想要在ThreadId上过滤。
线程窗口
另一种方式是通过Threads Window。在这里,您可以查看应用程序中的所有活动线程。
您可以尝试使用此扩展工具:
https://marketplace.visualstudio.com/items?itemName=mayerwin.DebugSingleThread
实际上其他成员也发布了此功能请求,并在此处分享了一些评论建议:
如果可能,您可以查看它,但如果所有建议或解决方法都不是您想要获得的,您还可以投票并添加您对上述功能请求的评论。