debug hmc code