-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
reproduce
on terminal
./python.exe
breakpoint()
# ctrl + D
another terminal
sudo ./python.exe -m pdb -p $(pid)

debug:
Pdb._last_pdb_instance still when do_quit in repl so remote pdb can not exec in it
fix:
diff --git a/Lib/pdb.py b/Lib/pdb.py
index f695a39332..3e32c50f96 100644
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -2008,6 +2008,7 @@ def do_quit(self, arg):
return
self._user_requested_quit = True
+ Pdb._last_pdb_instance = None
self.set_quit()
return 1
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error