Skip to content

Instantly share code, notes, and snippets.

@jgarte
Forked from kjordahl/pudb-add-breakpoint
Created July 24, 2022 22:00
Show Gist options
  • Save jgarte/15c23ae47236c47fcab9b32da737fbae to your computer and use it in GitHub Desktop.
Save jgarte/15c23ae47236c47fcab9b32da737fbae 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