Debugger allways changes to other Thread

Hi there,

I have an Desktop Application with different Threads. One background thread is allways watching for new Messages and send them if available (Let’s call it MessageHandler).
The Problem is, while I’m debugging the Debugger allways jump to the Code of MessageHandler. Then never comes back to the Code where it was before. The Code is running in Background.

How can I avoid the Debugger to jump to other Treads. Or how can I mark the Code of MessageHandler to not beeing debugged?

You can’t. However, you can switch the debugged thread back to Main Thread and set a breakpoint at the next line to be executed, then run. When the framework switches back to the main thread, it will stop at your new breakpoint and you can continue debugging.