Visual Studio 2008中的多线程调试

This might be old news but it was a treat for me. In debugging some multithreaded code recently got to use the improved debugger support for threads in Visual Studio 2008 (I'm running Beta 2) that John Robbins blogged about last month and Soma blogged last week.

这可能是个老新闻,但这对我来说是一种享受。 最近,在调试一些多线程代码时,必须使用对Visual Studio 2008(我正在运行Beta 2)中的线程的改进的调试器支持, John Robbins在上个月在博客上发表了文章, Soma在上周在博客上发表了文章

Take a look at the IDE screenshot below (click to Zoom).

看一下下面的IDE屏幕截图(单击以放大)。

There's a few cool and subtle things going on here. Take a look at the current instruction location in yellow. It's right at the end of the CheckDependancyCallback method - but see the gray highlight with the squiggly "thread" in the margin? That's the current location of another thread of execution.

这里有一些很酷和微妙的事情。 以黄色查看当前指令位置。 就在CheckDependancyCallback方法的末尾-但是看到带有突出显示的“线程”边缘的灰色高亮显示了吗? 那是另一个执行线程的当前位置。

You can name your threads now just by entering their name in the Threads toolbox window, and some threads without names will get an automatic name. You can also flag threads you're interested in watching so you don't have to remember the Thread ID.Take a look at the Debug toolbar as well. You can see the Debug Location including Process and Thread (what thread I'm currently debugging).

现在,只需在“线程”工具箱窗口中输入它们的名称即可为线程命名,某些没有名称的线程将获得一个自动名称。 您还可以标记您有兴趣观看的线程,这样就不必记住线程ID。也请查看“调试”工具栏。 您可以看到调试位置,包括进程和线程(我当前正在调试的线程)。

What a treat.

真好

翻译自: https://www.hanselman.com/blog/multithreaded-debugging-in-visual-studio-2008

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值