update debug code