add debug principle for lua