I have been trying to use pdb to debug my Python program, however whenever I get to this screen
I don't know what to do. Usually when I use pdb I just type commands after (Pdb), but when I try to do the same in the buffer above like
(Pdb) n
It gives me "n is undefined" in the minibuffer. I've tried to look at tutorials for using pdb in emacs specifically such as here and here, but I still can't figure out where to type the commands. When I used an IDE I just typed the commands like I tried above, but here it doesn't seem to work. I'm sure the solution must be obvious, but any help is appreciated.
pdb
as a compilation process... the buffer created byM-x compile
or similar is typically read-only, so typing anything into it will not result in changing the text of the buffer. How did you get to runningpdb
in this way? I normally just run my Python scripts from shell withpython -m pdb script.py [script arguments]
, but there should also be a way to run it from GUD.C-c C-p
and thenC-c C-c
along withimport pdb; pdb.set_trace()
works. I was confused since I thoughtC-c C-p
would run the program, but it seems that it only starts the Python process. I also tried realgud but I also couldn't seem to get that to work. I suppose I will have to chalk that up to new user error since I am still learning how this whole thing works. Thanks for the help.