improvements to debug script: fixed solib search path (now it finds almost all the libraries), removed hard-coded paths, better comments