-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-111744: Make breakpoint()
enter the debugger immediately
#118579
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2a35fbc
Make breakpoint break immediately
gaogaotiantian c848968
Update docs
gaogaotiantian 63a0915
Add a news entry for it
gaogaotiantian 7adfcea
📜🤖 Added by blurb_it.
blurb-it[bot] a1fc073
Fix doctest
gaogaotiantian 514b881
Update docs
gaogaotiantian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2056,8 +2056,7 @@ def test_pdb_set_trace(): | |
|
||
>>> try: runner.run(test) | ||
... finally: sys.stdin = real_stdin | ||
--Return-- | ||
> <doctest foo-bar@baz[2]>(1)<module>()->None | ||
> <doctest foo-bar@baz[2]>(1)<module>() | ||
-> import pdb; pdb.set_trace() | ||
(Pdb) print(x) | ||
42 | ||
|
@@ -2087,8 +2086,7 @@ def test_pdb_set_trace(): | |
... runner.run(test) | ||
... finally: | ||
... sys.stdin = real_stdin | ||
--Return-- | ||
> <doctest test.test_doctest.test_doctest.test_pdb_set_trace[9]>(3)calls_set_trace()->None | ||
> <doctest test.test_doctest.test_doctest.test_pdb_set_trace[9]>(3)calls_set_trace() | ||
-> import pdb; pdb.set_trace() | ||
(Pdb) print(y) | ||
2 | ||
|
@@ -2114,6 +2112,7 @@ def test_pdb_set_trace(): | |
>>> test = parser.get_doctest(doc, globals(), "foo-bar@baz", "[email protected]", 0) | ||
>>> real_stdin = sys.stdin | ||
>>> sys.stdin = FakeInput([ | ||
... 'step', # return event of g | ||
... 'list', # list source from example 2 | ||
... 'next', # return from g() | ||
... 'list', # list source from example 1 | ||
|
@@ -2124,6 +2123,9 @@ def test_pdb_set_trace(): | |
>>> try: runner.run(test) | ||
... finally: sys.stdin = real_stdin | ||
... # doctest: +NORMALIZE_WHITESPACE | ||
> <doctest foo-bar@baz[1]>(3)g() | ||
-> import pdb; pdb.set_trace() | ||
(Pdb) step | ||
--Return-- | ||
> <doctest foo-bar@baz[1]>(3)g()->None | ||
-> import pdb; pdb.set_trace() | ||
|
@@ -2188,6 +2190,7 @@ def test_pdb_set_trace_nested(): | |
>>> test = parser.get_doctest(doc, globals(), "foo-bar@baz", "[email protected]", 0) | ||
>>> real_stdin = sys.stdin | ||
>>> sys.stdin = FakeInput([ | ||
... 'step', | ||
... 'print(y)', # print data defined in the function | ||
... 'step', 'step', 'step', 'step', 'step', 'step', 'print(z)', | ||
... 'up', 'print(x)', | ||
|
@@ -2201,6 +2204,9 @@ def test_pdb_set_trace_nested(): | |
... finally: | ||
... sys.stdin = real_stdin | ||
... # doctest: +REPORT_NDIFF | ||
> <doctest test.test_doctest.test_doctest.test_pdb_set_trace_nested[0]>(4)calls_set_trace() | ||
-> import pdb; pdb.set_trace() | ||
(Pdb) step | ||
> <doctest test.test_doctest.test_doctest.test_pdb_set_trace_nested[0]>(5)calls_set_trace() | ||
-> self.f1() | ||
(Pdb) print(y) | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.