spenceforce / pdb-attach

A python debugger that can attach to running processes.
BSD 3-Clause "New" or "Revised" License
33 stars 1 forks source link

Fix interact command #18

Closed spenceforce closed 2 years ago

spenceforce commented 2 years ago

Properly handle the interact console (#17) and exits gracefully on an EOFError.

A large overhaul of the IPC was required. There are test cases for the IO used by the interactive console, but no test cases for the end to end use of the interactive console. This is a pitfall of testing end to end with redirection of stdin/stdout. While it's the most natural emulation of using pdb-attach from end to end it cannot handle an EOF character (^D) like in the terminal. A different approach will be needed to test this end to end. Something similar to the mock server that was previously used in tests, but less clunky.