2

When debugging my Python code, I run a script through ipdb from the command line, and set a number of breakpoints. Then I make some changes in one or more modules, and rerun. However, if I simply use run modules do not get reloaded. To make sure they do, I can exit and restart Python completely, but then I need to reset all breakpoints, which is tedious if I have many and if done over and over again.

Is there a way to restart a run in (i)pdb, and make sure all modules get recursively reloaded?

Community
  • 1
  • 1
gerrit
  • 24,025
  • 17
  • 97
  • 170
  • a similar question has already been asked here http://stackoverflow.com/questions/15506971/recursive-version-of-reload – Eli Korvigo Mar 03 '15 at 20:42
  • @EliKorvigo Not really. I would still need a way to run this inside `ipdb`, and take effect in the surrounding code. – gerrit Mar 03 '15 at 20:43
  • Possible duplicate of [How to make pdb recognize that the source has changed between runs?](https://stackoverflow.com/questions/724924/how-to-make-pdb-recognize-that-the-source-has-changed-between-runs) – Ciro Santilli OurBigBook.com Nov 21 '17 at 13:50

0 Answers0