Measuretid, in debug mode, displays the length of the edge

I think it’s a good idea to display the length of the border, in debug mode, and with few lines it’s possible to get this feature.
to do this, I modify the function " def draw_edges(" in the source code “” to this:

def draw_edges(context, myobj, region, rv3d):
# Only meshes
if myobj.type != “MESH”:

scene = bpy.context.scene
rgba = scene.measureit_debug_edge_color
fsize = scene.measureit_debug_font
precision = scene.measureit_debug_precision
# --------------------
# edge Loop
# uses lambda for edge midpoint finder (midf) because edit mode
# edge vert coordinate is not stored in same places as in obj mode
# --------------------
_lenght = '' 
if myobj.mode == 'EDIT':
    bm = from_edit_mesh(
    obedges = bm.edges
    obverts = None  # dummy value to avoid duplicating for loop
    midf = lambda e, v: e.verts[0].co.lerp(e.verts[1].co, 0.5)
    obedges =
    obverts =
    midf = lambda e, v: v[e.vertices[0]].co.lerp(v[e.vertices[1]].co, 0.5)

for e in obedges:
    # Display only selected
    if scene.measureit_debug_select is True:
        if is False:
    if myobj.mode == 'EDIT':
      _lenght = (e.verts[0].co - e.verts[1].co).length
      _lenght = (e.vertices[0].co - e.vertices[1].co).length
    _text = '{} ({})'.format(e.index,  round(_lenght, precision))
    a_mp = midf(e, obverts)
    a_p1 = get_point(a_mp, myobj)
    # converting to screen coordinates
    txtpoint2d = get_2d_point(region, rv3d, a_p1)
    # draw_text(myobj, txtpoint2d, str(e.index), rgba, fsize) # old code - only index
    draw_text(myobj, txtpoint2d, _text, rgba, fsize)