def wait_for_debugger(pid):
 with log.waitfor('Waiting for debugger') as l:
  while (tracer(pid) is None):
   time.sleep(0.01)
  l.success()

def wait_for_debugger ( pid ) : with log . waitfor ( 'Waiting for debugger' ) as l : while ( tracer ( pid ) is None ) : time . sleep ( 0.01 ) l . success ( )
wait_for_debugger -> none sleeps until the process with pid pid is being traced .