This can be done with exception breakpoints.
This can be done with exception breakpoints.