How to debug a single thread in Visual Studio?

后端 未结 10 1599
执笔经年
执笔经年 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:32

    I would suggest adding another instance of the application on the live server, either on the same hardware or a new machine (cluster it) and then debug only that instance. I wouldn't add a breakpoint in code users are triggering. If that's not an option, I'd add more tracing.

    However, if this is absolutely necessary and you need a solution stat, I'm sure you could add a breakpoint that breaks only if the request is coming from your IP address. You would do this by adding a conditional breakpoint that inspects HttpContext.Request.UserHostAddress. Note however that this slows down your application considerably.

提交回复
热议问题