• Answers
  • Web
Personalize Yedda, (And make Danny Happy)
People ask & answer about almost everything. Tell us what you're interested in... So we can personalize Yedda especially for you
I'm interested in:
Originated from
Advanced .NET Debugging

Multithreaded C# debugging troubles

My multithreaded C# application in VS2005 often refuses to break into threads other than the main thread. It hits my breakpoints but after an awful pause. If I then try to step through the code execution resumes and my thread exits with an exception. What's going on? I've installed Service Pack 1 for VS2005 and it didn't help.


Share Send to a friend Watch Report
 

Best Answer

 
207 helpful answers

They're coming to take me away, Ha-haaa!

Advanced .NET Debugging Blog

My personal blog

The question is how threaded is your application. Debugging a highly threaded application in visual studio may cause some performance problems while debugging.

First, you should make sure that your main thread is bullet proof and won't finish before you finish debugging the other threads you wish to debug.

It is also important to notice that if a certain code runs on a couple of different threads (not shared, but a couple of threads perform the same operation using the same code) it will be very tricky to debug it since the breakpoint is set on a specific code and not on a specific thread.

I would try and use a little "printf" debugging and write things to the log (with the thread id, of course). 

In addition to that, what is the exception you are seeing?

Posted 2007-09-20T13:21:57Z
Eran was invited by Yedda to answer this question.

Helpful?(1)
Rated as Best Answer

 

All Answers

Sign in to participate

Got an answer for c_i_wood? Would you like to comment on the posted answers, or vote for the one which you think is the best?

Sign up for a free account, or sign in (if you're already a member).

Explore Related Questions

Other people asked questions on similar topics, check out the answers they received:


Q:

My question is about En_vs_2005_Pro_90_Trial.img ...

My question is about En_vs_2005_Pro_90_Trial.img. I downloaded this file with DAP and now I can't get it to open. I also ...
Submitted by cstec   2 years ago.
  • viewed 662 times
Last answer posted 2 years ago by Philly


Q:

Debugging c# without Visual-Studio installed?

How do I debug .NET application when Visual-Studio is not installed? Is there an independant debugging utility for C#, as WinDBG ...
Submitted by Paz   2 years ago.
  • viewed 2813 times
Last answer posted 2 years ago by Eran


Q:

WinDbg and C# Applications

What is WinDbg and can I use it to debug applications written in C#?
Submitted by kazabubu   3 years ago.
  • viewed 3307 times
Last answer posted 3 years ago by hmemcpy



» More...

Explore Related Posts in Forums

C-C-C-C-Combo

C-C-C-C-Combo C-C-C-C-C-ComboC-C-C-C-C-C-C-Combo! This post... -C-C-C-C-Combo I STILL BELIEVE IN BLUEQuote: C-C-C-C-C-...

C h o i c e s . . . C h o i c e s . . . ! ! ! . . . 10-12/04

Hi everybody! This is a thread to gather response before a confirmation to feature Natasha from Russia on 10th and 12th Apr... Apr(Fri and Sun) for 3 outdoor fashion shoot sessions of your choice, due to some pending assignments of hers. Do register... Great to shoot professional model but always crowded.Originally Posted by JayKay Great to shoot professional model but always...

-C=C-CHO to –C-C-CHO

I have an unsaturated aldehyde. I want to reduce the carbon-carbon double bond without disturbing the aldehyde group. Is ... there any specific reagent for this? although its a little "flavour of the month", a number of methods exist for reducing a,b-unsaturated aldehydes organocatalytically...
» More...
Powered by
Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
  • Answers
  • Web
Copyright © 2006-2009, Yedda Inc. and respective copyright owners · CC License