Wednesday, May 02, 2007

VS 2005 bug while using BackgroundWorker in debug mode

This seems to be a bug in VS 2005. While using BackgroundWorker component for running a certain task in a thread, I could not debug the application "step by step", mainly in the "DoWork" event. The code did just fine, but I wanted to check out a certain variable value at certain point.
After a lot of growling and swearing at folks from Microsoft, I accidently figured that 2 windows "local" and "auto" have to be closed so VS could allow you to debug step by step.

Wonder if this is bug related to BackgroundWorker or if it affects any other threads that we create?

2 comments:

Anonymous said...

I had the exact same problem debugging code in my DoWork method. Closing the "Locals" window did the trick. Thank you for the help.

Regards,
ElinK

Zeynep said...

it did work,really thanks