Add debug instrumentation, update to new VS unit iterator interface.