Commit Graph

237 Commits

Author SHA1 Message Date
Miss Islington (bot) e7008d78f3
[3.13] gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable (GH-118725) (#121346)
gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable (GH-118725)
(cherry picked from commit e245ed7d1e)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-07-03 12:15:53 -07:00
Tian Gao b7240ed3f0
[3.13] gh-119824: Revert the `where` solution and use meta commands (#120919) 2024-06-23 14:11:55 -07:00
Tian Gao 1c41aa78d8
[3.13] gh-119824: Print stack entry when user input is needed (GH-119882) (#120533)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-16 12:05:07 -07:00
Miss Islington (bot) db64dae745
[3.13] gh-74929: PEP 667 general docs update (gh-119291)
* expand on What's New entry for PEP 667 (including porting notes)
* define 'optimized scope' as a glossary term
* cover comprehensions and generator expressions in locals() docs
* review all mentions of "locals" in documentation (updating if needed)
* review all mentions of "f_locals" in documentation (updating if needed)

(cherry picked from commit e870c852c0)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-05-21 21:35:26 +10:00
Tian Gao e5353d49dc
GH-83151: Add closure support to pdb (GH-111094) 2024-05-06 11:34:13 -07:00
Tian Gao 5a0022a1d7
GH-111744: Make breakpoint() enter the debugger immediately (GH-118579) 2024-05-05 07:05:01 -07:00
Tian Gao 00da0afa0d
gh-113081: Print colorized exception just like built-in traceback in pdb (#113082) 2024-05-04 12:26:40 +02:00
Tian Gao 4e2caf2aa0
gh-118500: Add pdb support for zipapp (#118501) 2024-05-02 21:53:27 +01:00
Tian Gao d7ac427a79
gh-117618: Make package.module searchable for breakpoints and clean up docs (#117619) 2024-04-30 18:18:01 +00:00
Tian Gao 0fa571dbcd
Refactor pdb executable targets (#112570)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-03-29 12:02:01 -04:00
Tian Gao b3e8c78ed7
gh-113548: Allow CLI arguments to `pdb -m` (#113557) 2024-03-27 01:20:12 +00:00
Tian Gao 01e7405da4
gh-112948: Make pdb completion similar to repl completion (#112950) 2024-03-25 15:18:09 +00:00
Tian Gao a50cf6c3d7
gh-90095: Ignore empty lines and comments in `.pdbrc` (#116834) 2024-03-15 09:36:04 +00:00
Tian Gao 44f9a84b67
gh-90095: Make .pdbrc work properly and add some reasonable tests (#110496) 2024-03-11 21:27:00 +00:00
Tian Gao ccfc042bbf
gh-87115: Set `__main__.__spec__` to `None` in pdb (#116141) 2024-02-29 21:39:50 +00:00
Tian Gao 765b9ce9fb
gh-59013: Set breakpoint on the first executable line of function when using `break func` in pdb (#112470) 2024-01-31 13:03:05 +00:00
Tian Gao 8278fa2f56
gh-111051: Check if file is modifed during debugging in `pdb` (#111052) 2024-01-25 16:48:50 +00:00
Tian Gao 5c351fc85a
gh-112343: pdb: Use tokenize to replace convenience variables (#112380) 2024-01-17 14:50:31 +00:00
Tian Gao 3d712a9f4c
gh-102980: Redirect output of pdb's `interact` command, add tests and improve docs (#111194) 2023-12-07 11:19:33 +00:00
Tian Gao b90a5cf11c
gh-99367: Do not mangle sys.path[0] in pdb if safe_path is set (#111762)
Co-authored-by: Christian Walther <cwalther@users.noreply.github.com>
2023-11-27 23:11:40 +00:00
Tian Gao f44d6ff6e0
gh-110944: Make pdb completion work for alias and convenience vars (GH-110945) 2023-11-14 13:22:25 +01:00
Tian Gao 853b4b549d
gh-111719: Add extra check for alias command (#111720) 2023-11-04 23:05:22 +00:00
Tian Gao 1c9a0c4079
gh-59013: Make line number of function breakpoint more precise (#110582) 2023-10-27 22:01:31 +01:00
Tian Gao e6eb8cafca
GH-102895 Add an option local_exit in code.interact to block exit() from terminating the whole process (GH-102896) 2023-10-18 11:36:43 -07:00
Radislav Chugunov 162213f2db
gh-108791: Fix `pdb` CLI invalid argument handling (#108816) 2023-10-16 10:38:07 +01:00
Tian Gao fa18b0afe4
gh-84583: Make pdb enter post-mortem mode even for SyntaxError (#110883) 2023-10-15 11:55:00 +01:00
Tian Gao c523ce0f43
gh-65052: Prevent pdb from crashing when trying to display objects (#110578) 2023-10-11 19:52:14 +02:00
Tian Gao 9f8282de6b
gh-106670: Set convenience variable for post mortem debugging (#110493) 2023-10-09 08:17:24 +00:00
Tian Gao 73ccfa28c5
gh-109164: Replace `getopt` with `argparse` in pdb (#109165)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-22 16:55:48 +00:00
buermarc 68a6f21f47
gh-109375: Fix bug where pdb registers an alias without an associated command (#109376) 2023-09-14 22:31:30 +01:00
Tian Gao 391f3e3ca9
GH-106734: Disable tab completion in pdb's multiline mode (GH-106735) 2023-09-11 18:28:43 -07:00
Matthias Bussonnier 5f3433f210
gh-106670: Fix Pdb handling of chained Exceptions with no stacks. (#108865) 2023-09-06 09:41:56 +00:00
Tian Gao 6304d983a0
gh-108463: Make expressions/statements work as expected in pdb (#108464) 2023-09-04 21:44:40 +00:00
Matthias Bussonnier f75cefd402
gh-106670: Allow Pdb to move between chained exceptions (#106676) 2023-08-28 18:31:03 +00:00
Tian Gao 25a64fd28a
GH-103124: Multiline statement support for pdb (GH-103125) 2023-06-15 23:34:42 +00:00
Tian Gao d944d873b2
gh-103464: Add checks for arguments of pdb commands (GH-103465) 2023-05-31 20:51:46 +00:00
James Gerity 0449ffe3a4
gh-104301: Allow leading whitespace in disambiguated pdb statements (#104342) 2023-05-11 18:12:02 +01:00
Tian Gao 0fc58c66ba
gh-103693: Add convenience variable feature to `pdb` (#103694) 2023-05-03 15:04:50 +01:00
Tian Gao 31acfd78a0
gh-103578: Fix pdb reading code with non-utf8 encoding (#103581)
`pdb` should use `io.open_code` to open code to avoid encoding issue.
2023-04-25 23:04:51 -06:00
Tian Gao 2f41a009b7
gh-103143: Polish pdb help messages and doc strings (GH-103144)
* Made all the command part of the docstring match the official documentation
* Always have a space between the command and the description in docstring
* Added a helper function to format the help message

Before:

```
(Pdb) h a
a(rgs)
        Print the argument list of the current function.
(Pdb) h commands
commands [bpnumber]
        (com) ...
        (com) end
        (Pdb)
        ...
(Pdb) h interact
interact

        Start an interactive interpreter whose global namespace
        contains all the (global and local) names found in the current scope.
```

After
```
(Pdb) h a
      Usage: a(rgs)
      
      Print the argument list of the current function.
(Pdb) h commands
      Usage: (Pdb) commands [bpnumber]
             (com) ...
             (com) end
             (Pdb)
             ...
(Pdb) h interact
      Usage: interact
      
      Start an interactive interpreter whose global namespace
      contains all the (global and local) names found in the current scope.
```

Automerge-Triggered-By: GH:brandtbucher
2023-04-11 15:40:30 -07:00
Irit Katriel 264b87f7fd
gh-102799: use `sys.exception()` instead of `sys.exc_info()` in pdb (#103294) 2023-04-09 07:35:50 +05:30
Tian Gao 2667452945
gh-103225: Fixed zero lineno issue for pdb (#103265)
Co-authored-by: Artem Mukhin <ortem00@gmail.com>
2023-04-07 18:57:46 +01:00
gaogaotiantian e375bff037
gh-103068: Check condition expression of breakpoints for pdb (#103069)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Artem Mukhin <ortem00@gmail.com>
2023-03-29 12:09:12 +02:00
gaogaotiantian 3606753246
gh-103023: Add SyntaxError check in pdb's `display` command (#103024)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-03-27 22:37:22 +02:00
Irit Katriel e1e9bab006
gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last_traceback (#102779) 2023-03-18 11:47:11 +00:00
gaogaotiantian 5d677c556f
GH-101673: Fix pdb bug where local variable changes are lost after longlist (#101674) 2023-03-12 23:09:55 +00:00
James Gerity d91de288e7
gh-93696: Locate frozen module source with __file__ (#93697)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-10-25 06:22:53 -07:00
Irit Katriel 1a720c6003
gh-95913: make the new internal classes pdb.ModuleTarget/ScriptTarget private (GH-96053) 2022-08-18 11:16:07 +01:00
Carl Bordum Hansen f481a02e6c
bpo-39278: add docstrings to functions in pdb module (#17924) 2022-05-10 15:59:58 -05:00
Tom Sparrow 60705cff70
bpo-46434: Handle missing docstrings in pdb help (GH-30705) 2022-01-21 17:00:48 +00:00