merged debugger changes with Andrew's latest version