add better debugger check for macosx