开发者

Visual Studio 2010: Multiple requests debugging at the same time (Annoying!)

The setup

I have an MVC application that's making AJAX requests into my controller. The javascript is making more than one such request.

On my controller that gets called, I have a break point.

The an开发者_Python百科noyance

When I want to debug that controller action method, I hit my breakpoint, press F10 to continue on, but then the second request comes in and I hit the breakpoint again! I've now got two requests flowing through my code, and pressing F10 steps between the two, making the debugging nearly impossible as the current line jumps up and down, between files, etc without any consistent flow as it's tracking more than one request in the current debugging session!

My question

Can I tell a single request to just... go away... without affecting the other one? I've tried F5ing just one request, but that makes both continue, not just the current one.


You could disable the breakpoint immediately after its first hit (Ctrl-F9, or right click on the breakpoint and click disable - this is different from removing the breakpoint).

You can also "Freeze" a thread in the threads window (right click on the thread and click "Freeze" - use "Thaw" to reverse this).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜