-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Pdb does not stop at a breakpoint set on the line of a function definition #59013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In the following test both breakpoints are set on the line of a === main.py ================================== $ python main.py
> /path_to/main.py(8)main()
-> foo()
(Pdb) break 1
Breakpoint 1 at /path_to/main.py:1
(Pdb) break bar
Breakpoint 2 at /path_to/main.py:4
(Pdb) break
Num Type Disp Enb Where
1 breakpoint keep yes at /path_to/main.py:1
2 breakpoint keep yes at /path_to/main.py:4
(Pdb) continue
> /path_to/main.py(5)bar()
-> pass
(Pdb) continue
$ ================================================= The reverse occurs in the following test where pdb stops only at the === main.py ================================== $ python -m pdb main.py
> /path_to/main.py(1)<module>()
-> x = 1
(Pdb) break 3
Breakpoint 1 at /path_to/main.py:3
(Pdb) break bar
Breakpoint 2 at /path_to/main.py:6
(Pdb) break 9
Breakpoint 3 at /path_to/main.py:9
(Pdb) break
Num Type Disp Enb Where
1 breakpoint keep yes at /path_to/main.py:3
2 breakpoint keep yes at /path_to/main.py:6
3 breakpoint keep yes at /path_to/main.py:9
(Pdb) continue
> /path_to/main.py(3)<module>()
-> def foo():
(Pdb) continue
> /path_to/main.py(9)<module>()
-> x = 2
(Pdb) ================================================= The following patch fixes both inconsistencies by having pdb stop when Two test cases are included in the patch. |
Parsing the modules source seems a better way to fix this problem, see bpo-14913. |
With #110852, |
Fixed by #110582, thanks! |
Actually, there's still a case that's inconsistent. I did not figure out a solution then but I have a patch now. Let's reopen this and close it after the new PR is merged. |
…n using `break func` in pdb (#112470)
With #112470 merged, this problem is fully fixed. |
…on when using `break func` in pdb (python#112470)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
break func
#112470The text was updated successfully, but these errors were encountered: