mdmintz / pdbp

pdbp (Pdb+): A drop-in replacement for pdb and pdbpp. To replace "pdb", add "import pdbp" to an "__init__.py" file.
Other
69 stars 2 forks source link

Recover from autoreloading development servers ruining the terminal prompt #64

Closed jjmurre closed 3 months ago

jjmurre commented 3 months ago

When running a debug session (be it pdb, pdbpp or pdbp) and saving code in the editor, the autoreload of a development server (Flask Django) ruins the prompt of the terminal session, because the development server process is restarted.

This is not an pdbp issue, however maybe there is a way to mitigate this in some way an recover nicely from an autosave?

mdmintz commented 3 months ago

Since the original pdb has the same issue, and since it's probably happening in code that was unmodified from the original pdb, there's probably not much I can do in pdbp to fix it. Even if I found a possible way to fix it, I'm not sure how I would even go about testing the fix. Probably the best thing to do would be avoiding breakpoints during the time the server auto-reloads, if possible. Or maybe reach out to the pdb people directly, if they're available.