apply: Searching for program: No such file or directory, pdb
Summary
I'm trying to launch pdb with M-x pdb then I type the number of my file file.py to get the error:
apply: Searching for program: No such file or directory, pdb. I'm following what's done in the link:
https://realpython.com/emacs-the-best-python-editor/#debugging-support.
I get a *gud* buffer but it only says what my current directory is and nothing else.
Steps to reproduce
On file.py buffer.
-
M-x pbd - file.py
ENTER
My configuration
OS
Ubuntu 20
Result of (elpy-config)
Emacs.............: 26.3
Elpy..............: 1.32.0
Virtualenv........: None
Interactive Python: python3 3.8.2 (/usr/bin/python3)
RPC virtualenv....: system (/)
Python...........: python3 3.8.2 (//bin/python3)
Jedi.............: 0.17.0
Rope.............: 0.16.0
Autopep8.........: 1.5.2
Yapf.............: 0.30.0
Black............: 19.10b0
Elpy configuration in my init.el
(elpy-enable)
(defalias 'workon 'pyvenv-workon)
(setq python-shell-interpreter "python3"
elpy-rpc-python-command "python3"
python-shell-interpreter-args "-i")
pdb is the debugger available in python-mode.
elpy-pdb-debug-buffer (C-c C-u d) is the Elpy version, that allows to set breakpoints in the python buffer.
I would recommend elpy-pdb-debug-buffer.
It may not have been available when the post on RealPython was published (or they didn't knew about it).
ps: if you go for pdb, you can try M-x pdb RET python -m pdb file.py.