Drop to a debugger on a crashing signal if stdin is a tty (i.e., if interactive).
Completed merge of commit 0b607e6, with tweaking.