Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Key history lost when debugging program crash #156

Closed
ghost opened this Issue · 1 comment

1 participant

@ghost

The normal behavior: If I write 'a' in the ipython shell with pdb enabled, I enter ipdb-mode. Here I can identify the variable 'testme' through "testme = [1,2,3]". I now type 'q' to return to the ipython shell. If I now type 't' and the up arrow (or just the up arrow) I get 'testme = [1,2,3]" at the prompt. This is expected.

However, if I enter ipdb through a program error this behaviour is lost. If I define a file 'test.py' which contains only the line '1/0' and run it through "run(testme.py)" in ipython, I end up in ipdb-mode. If I now define 'testme = [1,2,3]' followed by 'q' to return to ipython shell, the testme input is not save to history. I cannot reach it by the up arrow.

It seems reasonable that history should be saved regardless of if have entered debugging through making an error in the ipython shell or if I enter it while debugging a program that failed.

@takluyver
Owner

This is intentional - we want the readline history to just contain IPython commands, not debugger commands. In fact, we modify the default behaviour to achieve this. The same happens if you run an interactive program with !cmd.

@takluyver takluyver closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.