add script debug support