Debugging vector code in presence of refcounting