From 4f3f060239fa8bc4e7db1fc9f19547b310d735dd Mon Sep 17 00:00:00 2001 From: James Gerity Date: Fri, 13 Jun 2025 21:04:40 -0400 Subject: [PATCH] Add warning about arguments that conflict with pdb --- Doc/library/pdb.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index f4b51664545be5..148aab2bca0f10 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -88,6 +88,15 @@ after normal exit of the program), pdb will restart the program. Automatic restarting preserves pdb's state (such as breakpoints) and in most cases is more useful than quitting the debugger upon program's exit. +.. warning:: + + If the target program has arguments that overlap with those given below, + they will be parsed incorrectly. To avoid this problem, separate target + program arguments from ``pdb`` arguments using ``--``, for example:: + + pdb target.py -- -m "Target program argument" + pdb -m target -- -m "Target program argument" + .. option:: -c, --command To execute commands as if given in a :file:`.pdbrc` file; see