Trim the debug string before printing it out.