Hi all,
I have a pretty serious multithreaded debugging problem. I have some kind of timing issue when interacting with a serial device, and I need to track it down. I have three threads:
- The main thread for UI updates. The user can either change one parameter of the device, or many all at once by choosing a preset.
- The status checking thread that queries to make sure that the device is still attached. If the user shuts off the device or the device itself is interacted with in an interesting way, the status changes need to be reflected in the UI.
- The thread that reads the serial port where the device responds.
My problem actually has to do with debugging this situation. It seems like every single line I have in each thread has to have a breakpoint in order to be debugged; if I break in one thread, the debugger won't step through that thread. I understand that the other threads will continue to update, but shouldn't the thread I'm on execute like normal in the debugger, ie, go from one line to the next? Then, I could use the 'threads' tab to switch between threads.
I mention that I'm in WPF because I don't know if that changes the situation at all; maybe it does, maybe it doesn't. The status checking thread is part of a UI control, because the status needs to only be checked while the UI is up. That control is in a library distinct from the main application.