added dynamic debug feature and xterm app