From 0428d0e96be41686858b030eeb4ff27f52822566 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 11 Jul 2019 05:51:18 +0200 Subject: [PATCH] Use "python -m pdb" when "pdb" is missing in M-x pdb * lisp/progmodes/gud.el (gud-pdb-command-name): Use "python -m pdb" when "pdb" is missing. (Bug#21521) --- lisp/progmodes/gud.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index b6a4ad3cd0c..30d4b199110 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -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) -- 2.39.2