Subject: bug#13586: pdbtrack doesn't jump to the source file location on the first exception/set_trace() call

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 14 Aug 2020 14:30:35 +0200

Greg Novak <[email-masked]> writes:

> !               ;; When the debugger encounters a pdb.set_trace()
> !               ;; command, it prints a single stack frame.  Sometimes
> !               ;; it prints a bit of extra information about the
> !               ;; arguments of the present function.  When ipdb
> !               ;; encounters an exception, it prints the _entire_ stack
> !               ;; trace.  To handle all of these cases, we want to find
> !               ;; the _last_ stack frame printed in the most recent
> !               ;; batch of output, then jump to the corrsponding
> !               ;; file/line number.
> !               (goto-char (point-max))
> !               (when (re-search-backward python-pdbtrack-stacktrace-info-regexp nil t)
>                   (setq line-number (string-to-number
>                                      (match-string-no-properties 2)))
>                   (match-string-no-properties 1)))))

commit 6ff930c3d206417e4cec9429fa5d71bb5c9af541
Author:     Fabián Ezequiel Gallina <[email-masked]>
AuthorDate: Wed Jan 30 12:02:58 2013 -0300
Commit:     Fabián Ezequiel Gallina <[email-masked]>
CommitDate: Wed Jan 30 12:02:58 2013 -0300

    * progmodes/python.el
    (python-pdbtrack-comint-output-filter-function): Enhancements on
    stacktrace detection.  (thanks @gnovak)

I looks like this was applied (with some changes) at the time, but this
bug report wasn't closed, so I'm doing that now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no