Subject: bug#25194: 25.1; Python debugger breakpoint error

From: [email-masked]
Date: Sun, 01 Jan 2017 23:35:40 -0500

tags 25194 unreproducible
quit

Live System User <[email-masked]> writes:
>
>   I never used this command before -- so I tried it:
>
>      M-x debug-on-entry RET gud-break
>
>      When trying to set a breakpoint, I got a *Backtrace*:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   file-name-directory(nil)
>   gud-format-command("break %d%f:%l" 4)

It looks like buffer-file-name-localized in gud-format-command is nil
for you, though I don't see how that's possible and I can't reproduce
this here.

(defun gud-format-command (str arg)
  (let ((insource (not (eq (current-buffer) gud-comint-buffer)))
        (frame (or gud-last-frame gud-last-last-frame))
        (buffer-file-name-localized
         (and (buffer-file-name)
              (or (file-remote-p (buffer-file-name) 'localname)
                  (buffer-file-name))))
    ...
         ((eq key ?d)
          (setq subst (file-name-directory (if insource
                                               buffer-file-name-localized
                                             (car frame))))