Add debug func

Signed-off-by: coldnew <coldnew.tw@gmail.com>