0

My python code is taking a long time to run and I need to close the computer for a moment without stopping the current console. I am using Spyder. Is there a way to pause execution and start it again where it was paused without restarting it from the beginning? I am not referring to setting breakpoints before the code is run, I want to be able to pause the code during execution.

Notice that Ctrl + S in this version is save as and Ctrl + Q is quit, so this method didn't work. If you have another method it would be very helpful to me. Thanks!

  • (*Spyder maintainer here*) If you have a laptop, I think you can close its lid without problems and open it again when you're ready to work. If not, please check my answer to [this question](https://stackoverflow.com/questions/72410107/python-debugging-spyder-pause-during-execution), which could help but only when Spyder 6 is released. – Carlos Cordoba Dec 12 '22 at 22:57
  • 1
    Thanks. I already resolved it. It turns out that when the laptop goes to sleep it still runs Spyder. So that's what I did, I was able to close my laptop and I didn't lose the data. – Cami Granda Dec 14 '22 at 22:43
  • Great! I'm glad to know you were able to solve your problem. – Carlos Cordoba Dec 15 '22 at 14:36

0 Answers0