1. A computer-implemented method, comprising: detecting, within a shell session, a runtime exception that causes the shell session to terminate; and serializing an object associated with the runtime exception prior to closure of the shell session, the serializing comprising: identifying the object's type; identifying data associated with the object's type; identifying one or more internal types of the object; for each of the one or more internal types, identifying data associated with that internal type; and generating a representation of the object that preserves the object's type, the data associated with the object's type, the internal types of the object, and data associated with each of the internal types.