Python mode in Emacs: No such file or directory, pdb

后端 未结 7 1628
南旧
南旧 2020-12-14 11:30

I have a python script that I want to debug with python-mode. I read in this thread that I can debug my python script with M-x pdb, however I get the following

7条回答
  •  自闭症患者
    2020-12-14 11:41

    You can create a custom command like this:

    ;; PDB command line
    (defun user-python-debug-buffer ()
      "Run python debugger on current buffer."
      (interactive)
      (setq command (format "python -u -m pdb %s " (file-name-nondirectory buffer-file-name)))
      (let ((command-with-args (read-string "Debug command: " command nil nil nil)))
        (pdb command-with-args)))
    

提交回复
热议问题