build: add debug.
handle short input as special case.