Debugging python programs in emacs

前端 未结 3 1379
攒了一身酷
攒了一身酷 2021-01-30 01:22

How to debug python programs in emacs?

I use python-mode.el

I get reference like

import pdb; pdb.set_trace();

bu

3条回答
  •  不要未来只要你来
    2021-01-30 02:14

    The realgud package (available from MELPA) supports PDB (among a gazillion other debuggers), and has a host of neat features that Emac's PDB doesn't have.

    The one I like best is the shortkeys mode. Once you start debugging a program, you can press n, s, c etc. right in the source window, instead of having to type these commands in the PDB buffer. It also supports Visual-Studio style keybindings with function keys (f10, f11, f5, etc).

    After installing RealGUD, you need to run M-x load-feature realgud to load it, and you can start pdb with M-x realgud:pdb.

提交回复
热议问题