I am running quite a time consuming python code in PyCharm, where data is initially loaded, then a model is created etc.
I would like to know if it is possible to set a breakpoint at a particular point in the code where the state of the environment will be saved. From there on I want to make edits to the rest of the code, however ideally re-run from the breakpoint I set.
By doing this I would avoid the loading of data, and model training which would be a repeated process.
Is this possible in Python or is there such a functionality in PyCharm? Thanks
AFAIK and according to this question form 2014, PyCharm does not support hot-swapping code during debug mode. When you set a breakpoint and do some changes in code they will not be applied.
You can however setup a Python propmt in debug console, which will have access to all your variables at the time of current code execution. You can modify their values and check why your code is failing. To do so just click on this icon