Monkeypatching is for wimps. Use set_trace_func.
aphyr.com