summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 97618b0..8dd4ded 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -1581,8 +1581,11 @@ def runctx(statement, globals, locals):
def runcall(*args, **kwds):
return Pdb().runcall(*args, **kwds)
-def set_trace():
- Pdb().set_trace(sys._getframe().f_back)
+def set_trace(*, header=None):
+ pdb = Pdb()
+ if header is not None:
+ pdb.message(header)
+ pdb.set_trace(sys._getframe().f_back)
# Post-Mortem interface