Is it possible to develop code in debug mode? Follow
All,
Is it possible to develop python code in debug mode?
What I mean is that I would like to possibility to run a program to a breakpoint and then develop code in the console. In this way I would like to try/test code in the console and then copy correct parts from the console to the editor.
Developing R code in this way using Eclipse/Statet is a very fast/agile experience compared to the cycle of writing code, debugging, analyzing the error, changing code and moving on to the next bug (possibly on the next line).
As far as I know PyCharm only supports the evaluation of one single statement. More specific it is not possible to change the state of the program being debugged using console statements (for example declare new variables)
Thanks
Is it possible to develop python code in debug mode?
What I mean is that I would like to possibility to run a program to a breakpoint and then develop code in the console. In this way I would like to try/test code in the console and then copy correct parts from the console to the editor.
Developing R code in this way using Eclipse/Statet is a very fast/agile experience compared to the cycle of writing code, debugging, analyzing the error, changing code and moving on to the next bug (possibly on the next line).
As far as I know PyCharm only supports the evaluation of one single statement. More specific it is not possible to change the state of the program being debugged using console statements (for example declare new variables)
Thanks
Please sign in to leave a comment.
However, in the long run I would recommend working with tests. You could write tests for one piece of code at a time. They would be quite small and exercise one small aspect of your application. Basically, like writing your console sessions down. As a consequence, they are very short and therefore quite easy to debug. You can find more info about this under the keyword TDD (test driven development).
PyCharm actually has command line in debug session (it's quite undiscoverable though).
Run Debug session, open Console tab in Debug toolwindow and click "Show command line" icon.
+1 on that! :) I had to search the forum to find out its existence.