Regardless of other options that may achieve the same result (i.e. adding breakpoints by hand), is it possible to programmatically add a breakpoint into the source code of a
It's not really responsive to your question, but you can cause the debugger to break based on conditions you set using Debug.Assert. So, instead of saying "next time I run a function that caused an exception, break" you can add assertions to your function to break when conditions are not what they should be. After all, there is no guarantee that a function will throw an exception this time just because it threw an exception last time. :)