Enables the breakpoints given as a space separated list of
breakpoint numbers.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
args = arg.split()
for i in args:
try:
breakpoint, it remains in the list of breakpoints and can be
(re-)enabled.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
args = arg.split()
for i in args:
try:
condition is absent, any existing condition is removed; i.e.,
the breakpoint is made unconditional.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
args = arg.split(' ', 1)
try:
cond = args[1]
and the breakpoint is not disabled and any associated
condition evaluates to true.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
args = arg.split()
if not args:
self.error('Breakpoint number expected')
instance it is not possible to jump into the middle of a
for loop or out of a finally clause.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
if self.curindex + 1 != len(self.stack):
self.error('You can only jump within the bottom frame')
return
argument (which is an arbitrary expression or statement to be
executed in the current environment).
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
sys.settrace(None)
globals = self.curframe.f_globals
locals = self.curframe.f_locals
Print the value of the expression.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
self._msg_val_func(arg, repr)
def do_pp(self, arg):
Pretty-print the value of the expression.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
self._msg_val_func(arg, pprint.pformat)
complete_print = _complete_expression
Try to get source code for the given object and display it.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
try:
obj = self._getval(arg)
except:
Print the type of the argument.
"""
+ if not arg:
+ self._print_invalid_arg(arg)
+ return
try:
value = self._getval(arg)
except:
def _print_invalid_arg(self, arg):
"""Return the usage string for a function."""
- self.error(f"Invalid argument: {arg}")
+ if not arg:
+ self.error("Argument is required for this command")
+ else:
+ self.error(f"Invalid argument: {arg}")
# Yes it's a bit hacky. Get the caller name, get the method based on
# that name, and get the docstring from that method.