Added automatic control of debugger visibility