I encountered this problem recently, I don’t know if you found a solution but I found a workaround if anybody else is wondering.
In the editor, at the Python command/execution box during your session, do this:
import sys
If you make changes to a local module that your main module imports, to force it to be reloaded issue the following command (in my case I was including “ui_main.py” in my main code)
del sys.modules["ui_main"]
This will remove it from the cache of loaded modules and any changes you make will be reflected when you next invoke your main script.