How to debug a single thread in Visual Studio?

后端 未结 10 1594
执笔经年
执笔经年 2020-11-28 17:59

I have a solution with some projects. There are several break-points in different projects. I want to trace the first thread hit one of these break-points and continue traci

10条回答
  •  失恋的感觉
    2020-11-28 18:14

    If multiple threads are being spawned as for a web application, @MattFaus answer's will not work. what I did instead is the following

    • Set up a breakpoint to interrupt the thread in the function I want.
    • Once the thread gets to the breakpoint and is paused, I remove the breakpoint and continue debugging using F8,F10 and F11, so that the others threads can run.

提交回复
热议问题