Currently, when I modify variables inside the interactive interpreter in pdb, it doesn't carry over outside the interactive session. Is there a way to do this?(I'm already aware of exec, !). However, I want to perform some multi-line operations.
(Pdb) c
(Pdb) pp locals()['a']
*** KeyError: 'a'
(Pdb) !a=2
(Pdb) pp locals()['a']
2
(Pdb) !del a
(Pdb) pp locals()['a']
*** KeyError: 'a'
(Pdb) interact
*interactive*
>>> a=2
>>>
now exiting InteractiveConsole...
(Pdb) pp locals()['a']
*** KeyError: 'a'