Add pretty print for error in debug mode.