drawRenderedElem(elem, isRtl) {
    if (DebugDrawer.config.elems) {
      let xPos = elem.xPos;
      if (isRtl) {
        xPos = -(xPos + elem.width);
      }
      const yPos = elem.centerline - elem.height / 2;
      this.debugElements_.push(
        Blockly.utils.dom.createSvgElement(
          'rect',
          {
            'class': 'rowRenderingRect blockRenderDebug',
            'x': xPos,
            'y': yPos,
            'width': elem.width,
            'height': elem.height,
            'stroke': 'black',
            'fill': 'none',
            'stroke-width': '1px',
          },
          this.svgRoot_,
        ),
      );

      if (
        Blockly.blockRendering.Types.isField(elem) &&
        elem.field instanceof Blockly.FieldLabel
      ) {
        const baseline = this.constants_.FIELD_TEXT_BASELINE;
        this.debugElements_.push(
          Blockly.utils.dom.createSvgElement(
            'rect',
            {
              'class': 'rowRenderingRect blockRenderDebug',
              'x': xPos,
              'y': yPos + baseline,
              'width': elem.width,
              'height': '0.1px',
              'stroke': 'red',
              'fill': 'none',
              'stroke-width': '0.5px',
            },
            this.svgRoot_,
          ),
        );
      }
    }

    if (
      Blockly.blockRendering.Types.isInput(elem) &&
      DebugDrawer.config.connections
    ) {
      this.drawConnection(elem.connectionModel);
    }
  }
Draw a debug rectangle for an in-row element.
@param {!Blockly.blockRendering.Measurable} elem The element to render.
@param {boolean} isRtl Whether the block is rendered RTL.
@protected