MCPcopy Index your code
hub / github.com/ipython/ipython / do_where

Method do_where

IPython/core/debugger.py:1067–1083  ·  view source on GitHub ↗

w(here) Print a stack trace, with the most recent frame at the bottom. An arrow indicates the "current frame", which determines the context of most commands. 'bt' is an alias for this command. Take a number as argument as an (optional) number of context line to

(self, arg: str)

Source from the content-addressed store, hash-verified

1065 self.shell.find_line_magic("psource")(arg, namespaces=namespaces)
1066
1067 def do_where(self, arg: str):
1068 """w(here)
1069 Print a stack trace, with the most recent frame at the bottom.
1070 An arrow indicates the "current frame", which determines the
1071 context of most commands. 'bt' is an alias for this command.
1072
1073 Take a number as argument as an (optional) number of context line to
1074 print"""
1075 if arg:
1076 try:
1077 context = int(arg)
1078 except ValueError as err:
1079 self.error(str(err))
1080 return
1081 self.print_stack_trace(context)
1082 else:
1083 self.print_stack_trace()
1084
1085 do_w = do_where
1086

Callers

nothing calls this directly

Calls 2

print_stack_traceMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected