Skip to content

Instantly share code, notes, and snippets.

@acrosby
Forked from kjordahl/pudb-add-breakpoint
Created October 1, 2013 15:02

Revisions

  1. @kjordahl kjordahl created this gist Jan 25, 2012.
    9 changes: 9 additions & 0 deletions pudb-add-breakpoint
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    ;; 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)