code: def do_debug(self, arg):
          
          revproxy_url = False
          if self.config.has_option('Server Parameters','adserver_revproxy_host'):
              if self.config.has_option( 'Server Parameters', 'adserver_revproxy_port'):
                  port = self.config.get( 'Server Parameters', 'adserver_revproxy_port')
              else:
                  port = 80
              revproxy_url = "http://{}:{}/ad".format(self.config.get('Server Parameters',
                                                                      'adserver_revproxy_host'),
                                                      port)
  
          if revproxy_url:
              base_url = revproxy_url
          elif 'OPENSHIFT_SECRET_TOKEN' in os.environ:
              base_url = "http://" + self.config.get('Server Parameters', 'host') + "/ad"
          else:
              if arg['--print-only']:
                  my_ip = get_my_ip()
                  base_url = "http://" + my_ip + ":" + \
                      self.config.get('Server Parameters', 'port') + "/ad"
              else:
                  base_url = "http://" + self.config.get('Server Parameters',
                                                     'host') + \
                  ":" + self.config.get('Server Parameters', 'port') + "/ad"
  
  
          launch_url = base_url + "?assignmentId=debug" + \
              str(self.random_id_generator()) \
              + "&hitId=debug" + str(self.random_id_generator()) \
              + "&workerId=debug" + str(self.random_id_generator() \
              + "&mode=debug")
  
          if arg['--print-only']:
              print("Here's your randomized debug link, feel free to request " \
                    "another:\n\t" + launch_url)
  
          else:
              print("Launching browser pointed at your randomized debug link, " \
                    "feel free to request another.\n\t" + launch_url)
              webbrowser.open(launch_url, new=1, autoraise=True)
docs: Usage: debug [options]
  
          -p, --print-only        just provides the URL, doesn't attempt to
                                  launch browser