Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
18e6e9c
Allow using sys.monitoring for bdb
gaogaotiantian Sep 25, 2024
b29aff5
Add basic line ignore
gaogaotiantian Sep 25, 2024
23601f3
Use setttrace as default backend for bdb
gaogaotiantian Sep 25, 2024
c9a92f6
📜🤖 Added by blurb_it.
blurb-it[bot] Sep 25, 2024
8955d78
Use settrace by default for pdb.Pdb, but use monitoring for all
gaogaotiantian Sep 26, 2024
6afc2e7
Only trigger events on thread calling start_trace
gaogaotiantian Oct 16, 2024
b595682
Use local events when possible
gaogaotiantian Oct 16, 2024
addf465
Merge branch 'main' into pdb-use-monitoring
gaogaotiantian Jan 19, 2025
70d5138
Fix ignore and condition of breakpoints
gaogaotiantian Feb 8, 2025
7c83425
Merge branch 'main' into pdb-use-monitoring
gaogaotiantian Feb 8, 2025
fe9971c
Address comments about backend
gaogaotiantian Feb 18, 2025
69a5030
Merge branch 'main' into pdb-use-monitoring
gaogaotiantian Feb 18, 2025
05cc3b0
We need BaseException to handle SystemExit case
gaogaotiantian Feb 18, 2025
e6bc287
Move default_backend to module level and provide utils
gaogaotiantian Feb 19, 2025
f0c1306
Do not need to pass trace_dispatch explicitly
gaogaotiantian Feb 19, 2025
a9b53ed
Add docs
gaogaotiantian Feb 19, 2025
9790085
Add version added
gaogaotiantian Feb 19, 2025
ea811f2
Add new functions to __all__
gaogaotiantian Feb 19, 2025
ad2179e
Merge branch 'main' into pdb-use-monitoring
gaogaotiantian Mar 7, 2025
e4ccd8a
Restart events after user line
gaogaotiantian Mar 7, 2025
d2c1f2e
Merge branch 'main' into pdb-use-monitoring
gaogaotiantian Mar 17, 2025
e9252ec
Remove blank line
gaogaotiantian Mar 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not need to pass trace_dispatch explicitly
  • Loading branch information
gaogaotiantian committed Feb 19, 2025
commit f0c1306461a4ad8ec7b914e5129593ccbbc2b339
12 changes: 6 additions & 6 deletions Lib/bdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ def canonic(self, filename):
self.fncache[filename] = canonic
return canonic

def start_trace(self, trace_dispatch):
def start_trace(self):
if self.monitoring_tracer:
self.monitoring_tracer.start_trace(trace_dispatch)
self.monitoring_tracer.start_trace(self.trace_dispatch)
else:
sys.settrace(self.trace_dispatch)

Expand Down Expand Up @@ -615,7 +615,7 @@ def set_trace(self, frame=None):
frame = frame.f_back
self.set_stepinstr()
self.enterframe = None
self.start_trace(self.trace_dispatch)
self.start_trace()

def set_continue(self):
"""Stop only at breakpoints or when finished.
Expand Down Expand Up @@ -900,7 +900,7 @@ def run(self, cmd, globals=None, locals=None):
self.reset()
if isinstance(cmd, str):
cmd = compile(cmd, "<string>", "exec")
self.start_trace(self.trace_dispatch)
self.start_trace()
try:
exec(cmd, globals, locals)
except BdbQuit:
Expand All @@ -920,7 +920,7 @@ def runeval(self, expr, globals=None, locals=None):
if locals is None:
locals = globals
self.reset()
self.start_trace(self.trace_dispatch)
self.start_trace()
try:
return eval(expr, globals, locals)
except BdbQuit:
Expand All @@ -942,7 +942,7 @@ def runcall(self, func, /, *args, **kwds):
Return the result of the function call.
"""
self.reset()
self.start_trace(self.trace_dispatch)
self.start_trace()
res = None
try:
res = func(*args, **kwds)
Expand Down
2 changes: 1 addition & 1 deletion Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ def do_debug(self, arg):
except Exception:
self._error_exc()
self.message("LEAVING RECURSIVE DEBUGGER")
self.start_trace(self.trace_dispatch)
self.start_trace()
self.lastcmd = p.lastcmd

complete_debug = _complete_expression
Expand Down