Moved debug hook to Vm directly