This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients georg.brandl, inducer, xdegaye
Date 2012-10-02.19:19:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349205548.07.0.809731032675.issue6322@psf.upfronthosting.co.za>
In-reply-to
Content
Another example where pdb does not stop at breakpoints set at
global, else and finally statements:

$ nl -ba foo.py
     1  x = 1
     2  def main():
     3      global x
     4      try:
     5          if not x:
     6              x = 2
     7          else:
     8              x = 3
     9      finally:
    10          x = 4
    11
    12  if __name__ == "__main__":
    13      main()
    14      print(x)
    15
$ python3 -m pdb foo.py
> /path_to/foo.py(1)<module>()
-> x = 1
(Pdb) break 3
Breakpoint 1 at /path_to/foo.py:3
(Pdb) break 7
Breakpoint 2 at /path_to/foo.py:7
(Pdb) break 9
Breakpoint 3 at /path_to/foo.py:9
(Pdb) break 14
Breakpoint 4 at /path_to/foo.py:14
(Pdb) continue
> /path_to/foo.py(14)<module>()
-> print(x)
(Pdb)

==============
vim:sts=2:sw=2
History
Date User Action Args
2012-10-02 19:19:08xdegayesetrecipients: + xdegaye, georg.brandl, inducer
2012-10-02 19:19:08xdegayesetmessageid: <1349205548.07.0.809731032675.issue6322@psf.upfronthosting.co.za>
2012-10-02 19:19:08xdegayelinkissue6322 messages
2012-10-02 19:19:07xdegayecreate