-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doit based dev interface garbles pdb command history (in some cases) #16452
Comments
I am not sure what is happening, the profile seems to be loaded but the interaction with conda is somehow fragile. I have the following when I am in a conda env, and nothing if I am outside anything:
And since we advice to use a conda env, this could be an issue. Note that working in this shell does work just fine. |
While we are at it, |
As a possible lead, there's something called readline: https://stackoverflow.com/questions/10140198/python-debugger-pdb-stopped-handlying-up-down-arrows-shows-a-instead Also, the cpython docs have a cryptic comment, which may or may not be related, about Cmd.raw_input attribute: (https://docs.python.org/3/library/cmd.html#cmd.Cmd.use_rawinput) |
I actually asked on the python discourse: https://discuss.python.org/t/what-controls-the-pdb-history-the-up-arrow-key/21780/2 So ISTM the issue is somewhere in pydevtool, which goes at some lengths at emulating the cmd. @schettino72 would this make any sense to you maybe? |
The problem is that doit (and pytest as well) capture sys.stdout before actually sending the output to the terminal. this mess up with doit also provides a custom Actions:
makes sense? [1] https://pydoit.org/tools.html#set-trace |
Tried it now, doesn't seem to work:
|
There is a little glitch with the new
doit
dev.py interface, and I'm not exactly sure where to even start looking from. The bottom line is that in pdb, the uparrow does not work for getting a previous command. Roughly like this:Things work in a regular python session:
Then, throw a breakpoint somewhere, e.g. with this trivial patch:
and run tests:
@tupui did you mention something about the
.bash_profile
not being properly sourced?The text was updated successfully, but these errors were encountered: