Loop to attach a debugger