I am debugging an algorithm that is being represented by a set of ViewModels. In order to debug this algorithm I would like to redraw the View while stepping through part of the algorithm. Is this possible? (I would prefer to just repaint, not do what they call "DoEvents" to process all events.)
Alas, when your debugger has stopped on a breakpoint, the debugger will suspend all threads in your application. I have a similar issue, this is what i do.
1) Instead of breakpoints, I put tracepoints with really detailed information. In visual studio, if you put curly braces , like {abc} , the value of variable ABC will be output to standard output
2) Logging. Its very useful when you cant pause your program
3) Structured exception handling. If you throw exceptions when you have problems, you can track it easier when the program begins to unwind due to error.
4) Assert as much as you can. This way if your program doesnt halt, it means everything is good in the algorithms.
This blog post suggests you do show a MessageBox.. I think he assumes you are using WinForms, but this could work the same way for WPF.