add a check-debug-status function

Signed-off-by: Qu Xiaofeng <quxiaofeng.at.polyu@gmail.com>