Commit Graph

127 Commits

Author SHA1 Message Date
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 c2982380f8
gh-112510: Add `readline.backend` for the backend readline uses (GH-112511)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
2023-12-01 14:05:55 +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 1c7ed7e9eb
gh-110944: Move pty helper to test.support and add basic pdb completion test (GH-111826) 2023-11-13 11:23:06 +01:00
Tian Gao 148af38cd0
gh-80731: Avoid executing code in except block in cmd (GH-111740) 2023-11-10 21:13:29 +00:00
Tian Gao 853b4b549d
gh-111719: Add extra check for alias command (#111720) 2023-11-04 23:05:22 +00:00
Tian Gao cd6b2ced75
gh-80675: Set `f_trace_lines = True` on all frames upon `pdb.set_trace()` (#110881) 2023-11-04 19:59:36 +00:00
Tian Gao 1c9a0c4079
gh-59013: Make line number of function breakpoint more precise (#110582) 2023-10-27 22:01:31 +01: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
buermarc 68a6f21f47
gh-109375: Fix bug where pdb registers an alias without an associated command (#109376) 2023-09-14 22:31:30 +01:00
Mark Shannon 4a69301ea4
GH-108976. Keep monitoring data structures valid during de-optimization during callback. (GH-109131) 2023-09-11 14:37:09 +01: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
Mark Shannon 45f5aa8fc7
GH-103082: Filter LINE events in VM, to simplify tool implementation. (GH-104387)
When monitoring LINE events, instrument all instructions that can have a predecessor on a different line.
Then check that the a new line has been hit in the instrumentation code.
This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.
2023-05-12 12:21:20 +01: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
Irit Katriel 1c01f8d797
gh-101517: fix line number propagation in code generated for except* (#103550) 2023-04-24 21:58:51 +01:00
Tian Gao 7c1b0a46c6
gh-101517: Add regression test for a lineno bug in try/except* impacting pdb (#103547) 2023-04-14 21:40:31 +01:00
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
gaogaotiantian ded9a7fc19
gh-102980: Add tests for pdf's display, alias and where commands (#102981) 2023-03-24 20:50:06 +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
Brandt Bucher 23ee4a8067
gh-94215: Fix error handling for line-tracing events (GH-94681)
* Re-enable crasher
* Fix error handling for line-tracing events
* blurb add
2022-07-08 14:40:35 +02:00
Christian Heimes de5884295e
gh-94215: Add reproducer for segfault in frame_setlineno() (GH-94563) 2022-07-07 12:53:57 +02:00
Kumar Aditya 5b6e5762ca
GH-91742: Fix pdb crash after jump (GH-94171) 2022-06-23 15:19:13 +01:00
Victor Stinner 329afe78c3
gh-57684: Update tests for PYTHONSAFEPATH=1 (#92358)
Fix tests failing with the PYTHONSAFEPATH=1 env var.

Enhance also -P help in Python usage (python --help).
2022-05-06 03:41:24 +02:00
Christian Heimes deeaac49e2
bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)
- Add requires_fork and requires_subprocess to more tests
- Skip extension import tests if dlopen is not available
- Don't assume that _testcapi is a shared extension
- Skip a lot of socket tests that don't work on Emscripten
- Skip mmap tests, mmap emulation is incomplete
- venv does not work yet
- Cannot get libc from executable

The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
2022-03-22 03:04:36 -07:00
Tom Sparrow 60705cff70
bpo-46434: Handle missing docstrings in pdb help (GH-30705) 2022-01-21 17:00:48 +00:00
Victor Stinner e08e491a6c
bpo-45208: Make test_pdb.test_checkline_is_not_executable() quiet (GH-28354)
test_pdb.test_checkline_is_not_executable() no longer writes output
to stdout.

Remove also unused variables 'f'.
2021-09-15 20:19:31 +02:00
Serhiy Storchaka 851811f577
bpo-5846: Do not use obsolete unittest functions. (GH-28303)
Get rid of use of makeSuite() and findTestCases().
Also make test_math and test_threading_local discoverable.
2021-09-13 10:49:53 +03:00
andrei kulakov 53b9458f2e
bpo-44682: Handle invalid arg to pdb's "commands" directive (#27252) 2021-07-28 18:55:03 +02:00
Jason R. Coombs ee03bad25e
bpo-44461: Check early that a pdb target is valid for execution. (#27227)
* bpo-44461: Fix bug with pdb's handling of import error due to a package which does not have a __main__ module

* 📜🤖 Added by blurb_it.

* remove "else"

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* If running as a module, first check that it can run as a module. Alternate fix for bpo-44461.

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-07-27 21:51:42 -04:00
Jason R. Coombs 2c20558844
bpo-44554: refactor pdb targets (and internal tweaks) (GH-26992)
- Refactor module/script handling to share an interface (check method).
- Import functools and adjust tests for the new line number for find_function.
- Use cached_property for details.
- Add blurb.

Automerge-Triggered-By: GH:jaraco
2021-07-18 18:00:35 -07:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 58248d9437
bpo-41137: Use utf-8 encoding while reading .pdbrc files (GH-21263) 2021-07-08 16:16:08 +09:00
Irit Katriel d968a638fc
bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656) 2021-07-03 16:33:35 +01:00
huzhaojie 4cb6ba1432
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646) 2021-06-11 16:17:56 +01:00
Daniel Hahler 6544b2532d
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) 2021-06-10 21:32:04 +01:00
Mark Shannon 54cb63863f
bpo-44348: Move trace-info to thread-state (GH-26623)
* Move trace-info to thread state.

* Correct output for pdb when turning on tracing in middle of line
2021-06-10 08:46:59 +01:00
Erlend Egeberg Aasland 8563a7052c
bpo-28528: Fix pdb.checkline() attribute error when 'curframe' is None. (#25438)
Co-authored-by: Thomas Kluyver <takowl@gmail.com>
2021-05-12 00:26:30 +01:00
Irit Katriel 21b02b5f40
bpo-43960: test_pdb resets breakpoints (GH-25673)
Reset global breakpoint state at the beginning of
test_pdb_next_command_in_generator_for_loop() to make it deterministic.
2021-04-28 12:38:29 +02:00