5

I am debugging a python program using the python debugger pdb.

E.g. python -m pdb myscript.py

Is there a way to rerun the script propagating the new changes in myscript.py? The command run does not do this.

In gdb, I believe there was a way to compile (from within gdb) and the restart the debugging session.

I was hoping for a similar feature in pdb, so that I do not need to exit pdb and then start it again just to get my changes in myscript.py to be propagated.

1 Answer 1

1

Use run, or restart, which is an alias of run. This will restart the program with all the new changes but preserve the breakpoints and other debugger information.

Sign up to request clarification or add additional context in comments.

1 Comment

Modules will not be reloaded.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.