#define DEBUG_VAR2(name,vv,pos_y) draw_text(str_printf(NULL,"%s: %.3f",_chr(name),(double)vv),10,pos_y,COLOR_RED)

Not tested, but try it - at least this is the general idea.