troubleshooting Question

c# / .net debugging multithread program

Avatar of esak2000
esak2000 asked on
.NET ProgrammingC#
3 Comments2 Solutions318 ViewsLast Modified:
I'm using ThreadPool.QueueUserWorkItem in c# to multithread through many urls (using httpwebrequest). Sometimes the program will just just hang, and as my code is very long I don't know where it's hanging. What's the best way to debug this?

I've tried:

1.  adding timeouts to the  httpwebrequest request and readwrite request
2.  adding breaks in the for loops of the code while it's running but that doesn't seem to be the problem as it doesn't break. Is there a way to find out where the code is exactly while it's running?
ASKER CERTIFIED SOLUTION
Michael Fowler
Solutions Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros