Conveys debug information to the user.

 @param [Integer] depth the current depth of the resolution process.
 @return [void]
494421
def debug(depth = 0)
      if debug?
        debug_info = yield
        debug_info = debug_info.inspect unless debug_info.is_a?(String)
        STDERR.puts debug_info.split("\n").map {|s| "  " * depth + s }
      end
    end
344070
def show(recursively=false, out=STDOUT, depth=0)
      max_name_length = names.inject(5){|max_len, name| [max_len, name.length].max}
      if names.size > 0
        out.puts "#{" " * (depth*2)}*#{"-" * 80}"
      end
      names.each do |name|
        out.puts sprintf("#{" " * (depth*2)}%-#{max_name_length}s  Pos: %6s  Len: %6s  Type: %10s  Cont: %s",
                         name.to_s,
                         @scope.eval_bit_position(name),
                         @scope.eval_bit_length(name),
                         self[name].class.name.split("::").last,
                         self[name] ? self[name].content_description : "Nil")
        self[name].show(true, out, depth + 1) if recursively && self[name]
      end
    end
977332
def on(self, level):
        
        if isinstance(level, int) and level >= 0 and level <= 3:
            self._debug_level = level
815922
function setDebugLevel(level, printf) {
  var outLevel = 0;

  debug = debug2 = debug3 = debugTree = function() {};

  switch (String(level)) {
    case '3':
      debug3 = printf;
      outLevel++;
      // fall through
    case '2':
      debugTree = function (fmt, tree) {
        printf(fmt, util.inspect(tree.toJSON(), false, 64));
      };
      debug2 = printf;
      outLevel++;
      // fall through
    case '1':
      debug = printf;
      outLevel++;
      // fall through
    default:
      return outLevel;
  }
}
826918
def development_mode=(flag)
      self[:development_mode] = flag
      self.level = Logger::DEBUG
      if new_logger
        new_logger.level = self.level if self.logger.respond_to?(:level=)
      end
    end
285493
def debug(message = nil, &block)
      logger.add(Logger::DEBUG, message, self.logging_prefix, &block)
    end
1210044
def DEBUG_ON_RESPONSE(self, statusCode, responseHeader, data):
        '''
        
        '''
        if self.DEBUG_FLAG:  # pragma no branch (Flag always set in tests)
            self._frameBuffer[self._frameCount][1:4] = [statusCode, responseHeader, data]
            responseHeader[self.DEBUG_HEADER_KEY] = self._frameCount
737246
def debug(*messages)
      longest = messages.max_by(&:length).size
      width = TTY::Screen.width - longest
      print cursor.save
      messages.each_with_index do |msg, i|
        print cursor.move_to(width, i)
        print cursor.clear_line_after
        print msg
      end
      print cursor.restore
    end
95841
def debug(self, nest_level=1):
        

        if self.children is None:
            self._parse_children()

        prefix = '  ' * nest_level
        _basic_debug(prefix, self)
        for field_name in self:
            child = self._lazy_child(self._field_map[field_name])
            if child is not VOID:
                print('%s    Field "%s"' % (prefix, field_name))
                child.debug(nest_level + 3)
1013763
def debug(self, state=None):
        
        if state is None:
            return self.__debug
        self.__debug = bool(state)
        return self.__debug
484123
def debug_box_out(self, p_min: Union[Unit, Point2, Point3], p_max: Union[Unit, Point2, Point3], color=None):
        
        self._debug_boxes.append(
            debug_pb.DebugBox(
                min=self.to_debug_point(p_min), max=self.to_debug_point(p_max), color=self.to_debug_color(color)
            )
        )
885451
def index(from: nil, to: nil, &block)
      each_with_depth(from: from, to: to) do |line, depth, index|
        return index if block.call(line, depth, index)
      end
    end
1034980
def _depth_event(self, msg):
        

        if 'e' in msg and msg['e'] == 'error':
            # close the socket
            self.close()

            # notify the user by returning a None value
            if self._callback:
                self._callback(None)

        if self._last_update_id is None:
            # Initial depth snapshot fetch not yet performed, buffer messages
            self._depth_message_buffer.append(msg)
        else:
            self._process_depth_message(msg)
452184
def set_debug(self, set_to=True):
        
        if set_to:
            StreamHandler(sys.stdout).push_application()
            self._log.level = logbook.DEBUG
        self.debug = set_to
74489
def debug(msg = nil)
      if @logger
        msg = build_log(msg || yield, ActionCommand::LOG_KIND_DEBUG)
        @logger.info(format_log(msg))
      end
    end
110540
function Debug() {
  function _debug() {};

  _debug.log = function(_) {

    return Action({

      enter: function() {
        console.log("STATE =>", _, arguments);
      },

      update: function() {
        console.log("STATE (.)", _, arguments);
      },

      exit: function() {
        console.log("STATE <=", _, arguments);
      }

    });

  };

  return _debug;
}
532546
def debug_print_line(self, i, level, line):
        
        if self.debug_level == 2:
            print("Line %d (%d): '%s'" % (i + 1, level, line.rstrip(' \r\n\t\f')))
        if self.debug_level > 2:
            print("Line %d (%d):" % (i + 1, level))
            hexdump(line)