I have code like the one in this question, basically a UI-thread that gets updated from another thread and uses InvokeRequired() and Invoke(..). Now, if the method fails in the work part, the debugger stops on the Invoke(..) line -can I make it show me the line where it actually failed like it usually does?
I have code like the one in this question, basically a UI-thread that gets
Share
Have you tried having the debugger break on exceptions (in the VS menus: Debug -> Exceptions, navigate to “Common Language Runtime Exceptions” and optionally dig down to a specific exception type, check the Thrown check box)? This will cause the debugger to break at the code line where the exception is thrown. I think this works also in multithreaded scenarios.