pudb icon indicating copy to clipboard operation
pudb copied to clipboard

IPython shell freezes with remote debugging

Open lucio-aguirre opened this issue 3 years ago • 2 comments

After enjoying pudb for many years I am trying remote debugging for the first time. Everything works like a charm for me except when I hit ! to drop into an IPython shell. I get the usual >>> prompt but the terminal freezes.

Any ideas on what could be the issue? BTW, I'm running on Debian.

--Lucio Aguirre

P.S.: Thanks for an incredibly useful tool!

lucio-aguirre avatar Jun 10 '22 23:06 lucio-aguirre

Good question. I'm not super surprised that this doesn't work. Remote debugging makes use of a fairly hacky, precarious ballet of swapping out stdin and stdout before anyone has a chance to look:

https://github.com/inducer/pudb/blob/dab821fe50bb1c86ddfba703e0cfab5f7572369a/pudb/remote.py#L126=

and

https://github.com/inducer/pudb/blob/dab821fe50bb1c86ddfba703e0cfab5f7572369a/pudb/remote.py#L141=

Depending on where IPython gets its file handles, this could easily go south. It might be possible to get this working. I'd be happy to take a patch!

inducer avatar Jun 10 '22 23:06 inducer

Thanks for the pointers. I don't have bandwidth left to try to fix this ATM. Hopefully someone more familiar with the domain can give it a shot.

lucio-aguirre avatar Jun 13 '22 16:06 lucio-aguirre