stu
stu

Reputation: 8805

Is there a way to make multithreaded debugging in visual studio work the same way as eclipse?

In eclipse, you stop on a breakpoint and all the other threads keep running. If they happen to stop on a breakpoint, they stop, but your context remains the thread you were working with at the time. If you hit f8 (run) it might switch your context to another thread that is already stopped at a breakpoint, but if you f5 (step in) or f6 (step over) you will always remain in the same thread.

In visual studio (I'm a newbie to visual studio) I'm finding that if I step over (f10) or step in (f11) I may (and probably will) have my context switched to another thread and lose my train of execution unless I manually go back to my original thread.

I realize I can freeze all the other threads, but this becomes onerous if I do want to occasionally switch threads. This has to be an option somewhere, but visual studio is very filled with options and I haven't found it yet.

Upvotes: 3

Views: 97

Answers (1)

Bryan B
Bryan B

Reputation: 4535

http://screencast.com/t/itxo6Job

That is the only option I can think of that might help, but according to an MSDN blog (http://ppe.blogs.msdn.com/b/zainnab/archive/2010/10/22/break-all-processes-when-one-process-breaks-vstipdebug0029.aspx), it probably won't get you where you want.

This somewhat related question may help as well: "Step over" when debugging multithreaded programs in Visual Studio

Upvotes: 2

Related Questions