Spell it right the first time.
The joke aside, the trick for debugging is to break it into manageable parts. Perform one work task at the same time, make sure that it does what it should have done.
Once you have done this, debugging problems in the main thread are much simpler because you can pretty much ignore background workers and just assume that they give the right results when they should be.
The only place that is more difficult to debug than a single-threaded application is the relationship between threads, which should not be much more difficult if you use libraries the way you should.
Anon.
source share