Add ref to debug mode.