Added 'on_opt_error=pdb' to fall into pdb on error

This makes it easier to debug crashes in optimizations.
Merge pull request #1358 from delallea/on_opt_error_pdb

Added 'on_opt_error=pdb' to fall into pdb on error