PyCharm - how do I debug (like in Jupyter Notebook) without having to re-run the full script every-time that I modify code?

Viewed 633

I'm new to coding and to PyCharm. I've learned with Jupyter and trying to get my head around PyCharm debugging (using single/multiple breakpoints).

What I liked about Jupyter is that when you put your code into different blocks, run them to output lists which you'll then be working with (the lists - as long as you haven't done anything to permanently affect them, but in that case, I would do new_list = og_list.copy() and play with the new list, to avoid re-running all of the code above) to create/test your next lines of codes, I can't figure out a way to proceed in the same way into PyCharm/Debugging.

In PyCharm, the way that I am using it, it seems that every time that I am changing a line of code to re-test/debug, I need to run the full code once again. I know I must be doing it wrong. I've played a few videos now and read a few posts online but I still can't seem to get it. Anyone here available to help?

1 Answers

Are you aware that you could write jupyter notebooks in PyCharm? - The cell functionality of jupyter notebook is only given in jupyter notebook and ipython as far as I know.

You may also open a iPython-shell in PyCharm.

Also, remember that you can easily convert a jupyter notebook to a .py-File, so nothings prevents you from writing code in jupyter notebook.

Related