Questions about Xcode expressions, “Shared Swift State,” “scratch context”

My colleague ran into this earlier today, while working on a Swift project. He has an invalid variable pane expression (accidental typo), but he can't delete it because lldb crashes before he can get to that frame.

On a different machine, the same issue gives him

warning: Swift error in scratch context: error: failed to load module '<foo>'.
Shared Swift state for foo has developed fatal errors and is being discarded.
REPL definitions and persistent names/types will be lost.
  • Where does Xcode store expressions?
  • Where does Swift put “persistent names/types?”
  • What is the “scatch context?”