Fix some bugs in debugger
Use readline on linux