MCPcopy Index your code
hub / github.com/python/cpython / do_where

Method do_where

Lib/pdb.py:1737–1755  ·  view source on GitHub ↗

w(here) [count] Print a stack trace. If count is not specified, print the full stack. If count is 0, print the current frame entry. If count is positive, print count entries from the most recent frame. If count is negative, print -count entries from the least recent

(self, arg)

Source from the content-addressed store, hash-verified

1735 complete_cl = _complete_location
1736
1737 def do_where(self, arg):
1738 """w(here) [count]
1739
1740 Print a stack trace. If count is not specified, print the full stack.
1741 If count is 0, print the current frame entry. If count is positive,
1742 print count entries from the most recent frame. If count is negative,
1743 print -count entries from the least recent frame.
1744 An arrow indicates the "current frame", which determines the
1745 context of most commands. 'bt' is an alias for this command.
1746 """
1747 if not arg:
1748 count = None
1749 else:
1750 try:
1751 count = int(arg)
1752 except ValueError:
1753 self.error('Invalid count (%s)' % arg)
1754 return
1755 self.print_stack_trace(count)
1756 do_w = do_where
1757 do_bt = do_where
1758

Callers

nothing calls this directly

Calls 2

errorMethod · 0.95
print_stack_traceMethod · 0.95

Tested by

no test coverage detected