Is it possible to break all threads but one in Visual Studio 2010 Ultimate?
One of the threads in my application is running a TCP proxy. The server that it connects to disconnects when the client (that connects to my proxy) doesn't send a keep-alive packet every few seconds.
So I would need to break all other threads (like packet processing) so that I can edit that part without getting disconnected.
Is this achievable without add-ons?
By default only the thread that hits the breakpoint stops. However, you can modify the behavior by changing the breakpopint properties. Save this answer.
Visual Studio provides different tools for use in debugging multithreaded apps. For threads, the primary tools for debugging threads are the Threads window, thread markers in source windows, the Parallel Stacks window, the Parallel Watch window, and the Debug Location toolbar.
Select a thread. Right-click the thread. Select "Kill thread" from the context menu.
One solution that might possibly work, is to write a macro that you call when you stop at a BP that function evaluates some function that sends some stay alive packets.
E.g. your macro goes like
DTE.Windows.Item("{ECB7191A-597B-41F5-9843-03A4CF275DDE}").Activate() 'Immediate Window DTE.ExecuteCommand("Debug.Print", "KeepAliveFunc()")
It's obviously not ideal, but if nothing else helps...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With