Create an isolated section in bash?

Like in gdb, typing fs will create an independent section at the top of commandline shell which produce a psudo gui to debug.

pdb does not have it and I would like to add it, but how to create such section?

The function of gdb I am referring to:

Pictures of it:

You might want to install and use pudb instead of pdb.

Keep in mind pdb is included in the standard library, unlike gdb, which you install separately from the C compiler and runtime library.
Fixes to pdb are tied to Python releases; it’s not a good place for features that aren’t thoroughly tested.
Adding additional features to pdb would affect the size of all Python installations.