Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3577,6 +3577,11 @@ def main():
parser.error("argument -m: not allowed with argument --pid")
try:
attach(opts.pid, opts.commands)
except RuntimeError as e:
while e.__context__ is not None:
e = e.__context__
print(f"Error attaching to process: {e}")
sys.exit(1)
except PermissionError as e:
exit_with_permission_help_text()
return
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Print clearer error message when using pdb to attaching to a non-existing process on Linux.
Loading