elpy icon indicating copy to clipboard operation
elpy copied to clipboard

apply: Searching for program: No such file or directory, pdb

Open lljr opened this issue 5 years ago • 1 comments

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.

  1. M-x pbd
  2. 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")

lljr avatar May 02 '20 20:05 lljr

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.

galaunay avatar May 10 '20 15:05 galaunay