encode debug