Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fcf8b4c1
Commit
fcf8b4c1
authored
Jan 28, 2018
by
Mario Corchero
Committed by
Nick Coghlan
Jan 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-32206: Update pdb usage to include new module option (GH-5111)
parent
dd0e087e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Lib/pdb.py
Lib/pdb.py
+4
-2
Lib/test/test_pdb.py
Lib/test/test_pdb.py
+4
-1
No files found.
Lib/pdb.py
View file @
fcf8b4c1
...
...
@@ -1638,9 +1638,11 @@ def help():
pydoc
.
pager
(
__doc__
)
_usage
=
"""
\
usage: pdb.py [-c command] ...
pyfile
[arg] ...
usage: pdb.py [-c command] ...
[-m module | pyfile]
[arg] ...
Debug the Python program given by pyfile.
Debug the Python program given by pyfile. Alternatively,
an executable module or package to debug can be specified using
the -m switch.
Initial commands are read from .pdbrc files in your home directory
and in the current directory, if they exist. Commands supplied with
...
...
Lib/test/test_pdb.py
View file @
fcf8b4c1
...
...
@@ -1182,7 +1182,10 @@ class PdbTestCase(unittest.TestCase):
quit
"""
stdout
,
stderr
=
self
.
_run_pdb
([
"-m"
,
"pdb"
],
commands
)
self
.
assertIn
(
"Debug the Python program given by pyfile."
,
stdout
.
splitlines
())
self
.
assertIn
(
pdb
.
_usage
,
stdout
.
replace
(
'
\
r
'
,
''
)
# remove \r for windows
)
def
test_module_without_a_main
(
self
):
module_name
=
't_main'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment