I have a Django-Server inside a Docker and would like to be able to do remote-debug my scripts. The arrow-keys just won't work. I'm getting
(Pdb) ^[[A
instead of something useful. I'm just using a plain terminal on Ubuntu. No IDE or anything fancy.
As stated here I rewrote my docker-compose and it works with this line just fine:
__import__("remote_pdb").set_trace(host='0.0.0.0', port=4444)
With telnet I'm able to use most features of the pdb: telnet 0.0.0.0 4444
What's not working are the arrow-keys. Someone had that problem as well and I installed readline as this guy had the same problem: Python interactive mode history and arrow keys
dnf install ncurses-devel
pip3 install readline
No changes. (Installation works. I can import readline
).
I'm assuming the issue might come from the telnet. So I'm thinking of switching to ssh -t.
But now I'm supposed to log in:
ssh -t 0.0.0.0 -P 4444
qohelet@0.0.0.0's password:
There is no password. It's just a Docker. Also I wouldn't know the username.
I keep searching dand 2017 just called. I'm supposed to user gnureadline. No difference:
(Pdb) import gnureadline
(Pdb) ^[[A
I'm stuck now.