[3.7] bpo-35931: Gracefully handle any exception in pdb debug command (GH-12103) (GH-12285)



This is relevant for `debug doesnotexist()`, which would crash with a
NameError otherwise.
(cherry picked from commit 3e936431e23b424b1e4665e8165c245924f0ab02)


Co-authored-by: Daniel Hahler <github@thequod.de>


https://bugs.python.org/issue35931
4 files changed