The function BreakPoint can be used to set a breakpoint in a function or a script. Instead of a terminal input and output, the thus created breakpoint can be interacted with using a Widget.

BreakPoint()