debug method