diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index 01b21bf..b7f2165 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -38,7 +38,7 @@ from IPython.core.excolors import exception_colors has_pydb = False prompt = 'ipdb> ' #We have to check this directly from sys.argv, config struct not yet available -if '-pydb' in sys.argv: +if '--pydb' in sys.argv: try: import pydb if hasattr(pydb.pydb, "runl") and pydb.version>'1.17': diff --git a/IPython/core/shellapp.py b/IPython/core/shellapp.py index 99ebbd2..414e3a3 100644 --- a/IPython/core/shellapp.py +++ b/IPython/core/shellapp.py @@ -50,6 +50,14 @@ addflag('pdb', 'InteractiveShell.pdb', "Enable auto calling the pdb debugger after every exception.", "Disable auto calling the pdb debugger after every exception." ) +# pydb flag doesn't do any config, as core.debugger switches on import, +# which is before parsing. This just allows the flag to be passed. +shell_flags.update(dict( + pydb = ({}, + """"Use the third party 'pydb' package as debugger, instead of pdb. + Requires that pydb is installed.""" + ) +)) addflag('pprint', 'PlainTextFormatter.pprint', "Enable auto pretty printing of results.", "Disable auto auto pretty printing of results."