Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-106670: Allow Pdb to move between chained exceptions#106676
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
+526 −20
Merged
Changes from1 commit
Commits
Show all changes
12 commits Select commitHold shift + click to select a range
d39fbce Allow Pdb to move between chained exception.
Carreau920af94 Move the exception logic to its own function.
Carreaud24ed3c Make variable instance variable.
Carreau63a7347 Merge branch 'main' into gh-106670
AlexWaygood66a3944 Move back MAX_CHAINED_EXCEPTION_DEPTH to class variable
Carreaub4f79ad Apply suggestions from code review
Carreaue3b9e4a Adress some of the reviews
Carreau948551c add versionadded
Carreau9ba7bb8 Fix doc
Carreau3514edc add whatsnew
Carreau4e57c32 Update Doc/whatsnew/3.13.rst
Carreau9e7354b move paragraph
CarreauFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Apply suggestions from code review
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitb4f79adf771ff80db163a2a097d97fbff8beddca
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -644,7 +644,7 @@ can be overridden by the local file. | ||
| List or jump between chained exceptions. | ||
| When using ``pdb.pm()`` or ``Pdb.post_mortem(...)`` with a chained exception | ||
| instead of a traceback, itallows the user to move between the | ||
| chained exceptions using ``exceptions`` command to list exceptions, and | ||
| ``exception <number>`` to switch to that exception. | ||
iritkatriel marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
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 |
|---|---|---|
| @@ -1157,7 +1157,7 @@ def do_exceptions(self, arg): | ||
| self.message( | ||
| "Did not find chained exceptions. To move between" | ||
| " exceptions, pdb/post_mortem must be given an exception" | ||
| " objectrather than a traceback." | ||
| ) | ||
| return | ||
| if not arg: | ||
Carreau marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| @@ -2004,9 +2004,8 @@ def post_mortem(t=None): | ||
| currently being handled (an exception must be being handled if the | ||
| default is to be used). | ||
Carreau marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| If `t` is an exception object, the `exceptions` command makes it possible to | ||
| list and inspect its chained exceptions (if any). | ||
| """ | ||
| # handling the default | ||
| if t is None: | ||
4 changes: 1 addition & 3 deletionsMisc/NEWS.d/next/Library/2023-07-12-10-59-08.gh-issue-106670.goQ2Sy.rst
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 |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| Add the new ``exceptions`` command to the Pdb debugger. It makes it possible to move between chained exceptions when using post mortem debugging. |
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.