Prevent long strings from breaking the debug panel, closes #407, closes #196