Skip to content

Instantly share code, notes, and snippets.

@Camilotk
Forked from kjordahl/pudb-add-breakpoint
Created December 24, 2021 05:41
Show Gist options
  • Save Camilotk/390e7bda5c5175128c0eb588bb22e002 to your computer and use it in GitHub Desktop.
Save Camilotk/390e7bda5c5175128c0eb588bb22e002 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