简体   繁体   中英

Can't type in ipdb console in docker container

I'm using docker-compose to build my docker container and am running the container with the --service-ports flag like so:

docker-compose run --service-ports $(service_name) -d

When trying to call ipdb within a python script in the container using import ipdb; ipdb.set_trace() import ipdb; ipdb.set_trace() ipdb is initialised but I cannot type anything in the console. I also have to manually restart the terminal session in order to stop it ( CTRL+C , CTRL+D etc do nothing). It's not as if the terminal has frozen either as I can still scroll back and on focus / unfocus the cursor changes appearance too.

This is what my term looks like (I use iTerm ): 在此处输入图片说明

Any ideas how to fix this?

Turns out it boils down to ipdb not being compatible with eventlet.monkey_patch in the docker container.

Simple fix, switch to pdbpp :D

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM