Neil Knight
Neil Knight

Reputation: 48587

Debugging a multi-threaded application

I have inherited an application that throws up 100 threads at the start. This makes my debugging life extremely tricky. Is there a way of getting Visual Studio to follow one thread?

Upvotes: 16

Views: 9428

Answers (3)

Burak Altin
Burak Altin

Reputation: 468

Also the suggestion is in here have just solved my problem.

if you hit a breakpoint, disable it, and then begin stepping you should not stop on a different thread

Upvotes: 0

Polyfun
Polyfun

Reputation: 9649

If possible, I suggest that in Debug mode you limit the number of threads that are created, to a much more manageable number, e.g., 3. That way you can still can diagnose bugs due to interaction between threads, but you are not completely snowed under.

Upvotes: 2

Dean Chalk
Dean Chalk

Reputation: 20471

Have you tried using the 'Threads' window in Visual Studio (in Debug / Windows menu) ?

You can freeze threads and switch between them

Upvotes: 17

Related Questions