Debug hooks

does this look good? @jmcphers

note the more meaningful labels are lost; the registered labels will be the function names instead, e.g. `renderPlot`