Message171826
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 |
|
Date |
User |
Action |
Args |
2012-10-02 19:19:08 | xdegaye | set | recipients:
+ xdegaye, georg.brandl, inducer |
2012-10-02 19:19:08 | xdegaye | set | messageid: <1349205548.07.0.809731032675.issue6322@psf.upfronthosting.co.za> |
2012-10-02 19:19:08 | xdegaye | link | issue6322 messages |
2012-10-02 19:19:07 | xdegaye | create | |
|