debug for SM