Skip to content

Instantly share code, notes, and snippets.

@kjordahl
Created January 25, 2012 19:31
Show Gist options
  • Save kjordahl/1678070 to your computer and use it in GitHub Desktop.
Save kjordahl/1678070 to your computer and use it in GitHub Desktop.
Emacs lisp code to add pudb breakpoint to a python file (add to .emacs)
;; this location is "~/.pudb-bp" in older versions of pudb
(setq pudb-bp-file (expand-file-name "~/.config/pudb/saved-breakpoints"))
(defun pudb-add-breakpoint ()
(interactive)
(append-to-file
(concat "b " buffer-file-name ":"
(nth 1 (split-string (what-line))) "\n")
nil pudb-bp-file))
(define-key py-mode-map (kbd "C-c C-t") 'pudb-add-breakpoint)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment