Visual Studio中,调试多线程之一 [英] Visual Studio, debug one of multiple threads

查看:251
本文介绍了Visual Studio中,调试多线程之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个线程的工作相同的代码的应用程序。然而,当我踏上它的跳跃,在不同的线程之间。我怎样才能将其锁定于一个线程,以便其他线程用​​于调试忽略?

I have an application with 4 threads working the same code. However, when I step it jumps between the different threads. How can I lock it to one thread so the other threads are ignored for debugging?

推荐答案

在线程窗口(调试 - >视窗 - >线程)右键单击你想要的线程,并选择切换到线程

In the Threads window (Debug -> Windows -> Threads) right-click the thread you want and select "switch to thread".

您也可以选择冻结的线程你不想为了调试,让他们运行。不要忘了解冻他们,如果你希望他们做的工作,但是。

You can also choose "freeze" on the threads you don't want to debug in order to keep them from running. Don't forget to "thaw" them if you expect them to do work, however.

延伸阅读

这篇关于Visual Studio中,调试多线程之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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