I'm trying to use the IPython debugger when an error occurs in my script, starting it like so:
ipython --InteractiveShell.pdb true [script_name]
While I use the debugger, if I try to assign to a new variable name, the debugger spontaneously quits. For example, suppose I attempt to debug some code that causes a TypeError
:
aa = 'asdf'
bb = 1
something_stupid = aa + bb
My debug session looks like so:
ipdb> aa
'asdf'
ipdb> bb
1
ipdb> aa = 'qwer'
ipdb> aa
'qwer'
ipdb> c = 1
imbackonthecommandline:path/to/directory$
I can see already existing variables, and I can update values of existing variables, but new variables cause a crash. I have tried updating ipython and restarting computer; this does not fix the problem.
I am using Debian from within Windows Subsystem for Linux, on Windows 10. Versions:
$ python --version
Python 3.9.6
$ ipython --version
7.29.0
What is wrong, and how do I fix it?