]> git.eshelyaron.com Git - emacs.git/commitdiff
Use "python -m pdb" when "pdb" is missing in M-x pdb
authorStefan Kangas <stefankangas@gmail.com>
Thu, 11 Jul 2019 03:51:18 +0000 (05:51 +0200)
committerNoam Postavsky <npostavs@gmail.com>
Fri, 9 Aug 2019 00:07:37 +0000 (20:07 -0400)
* lisp/progmodes/gud.el (gud-pdb-command-name): Use "python -m pdb"
when "pdb" is missing.  (Bug#21521)

lisp/progmodes/gud.el

index b6a4ad3cd0c939a949df90e33c940450708fca29..30d4b199110dd1cad024fff18c37b710131ba720 100644 (file)
@@ -1673,9 +1673,10 @@ and source-file directory for your debugger."
 
     output))
 
-(defcustom gud-pdb-command-name "pdb"
-  "File name for executing the Python debugger.
-This should be an executable on your path, or an absolute file name."
+(defcustom gud-pdb-command-name
+  (if (executable-find "pdb") "pdb" "python -m pdb")
+  "Command that executes the Python debugger."
+  :version "27.1"
   :type 'string
   :group 'gud)