-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
pdb
CLI doesn't handle incorrect arguments properly
#108791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
type-bug
An unexpected behavior, bug, or error
Comments
iritkatriel
pushed a commit
that referenced
this issue
Oct 16, 2023
This was referenced Oct 19, 2023
iritkatriel
pushed a commit
that referenced
this issue
Oct 19, 2023
iritkatriel
pushed a commit
that referenced
this issue
Oct 19, 2023
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Checklist
and am confident this bug has not been reported before
CPython versions tested on:
3.11, 3.12, CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.0a0 (heads/main:578ebc5d5f, Sep 1 2023, 20:48:35) [GCC 10.2.1 20210110]
A clear and concise description of the bug:
pdb
module produces large traceback instead of short error message if invoked with invalid command line option. This happens because it doesn't handle exceptions that can occur ingetopt.getopt
, as it typically done.A similar situation is with nonexistant modules and directory names. In the first case an exception that occurs in
_ModuleTarget.check
is printed to stderr with its traceback. In the second case directory name is 'successfully' checked by_ScriptTarget.check
call, and debugger is ran on invalid target.I'm working on a fix.
Linked PRs
pdb
CLI invalid argument handling #108816pdb
CLI invalid argument handling (GH-108816) #110915pdb
CLI invalid argument handling (GH-108816) #110916The text was updated successfully, but these errors were encountered: