HOW TO use Pycharm to debug python script?
Take a look at Run -> Edit Configuration dialog where you should click on Add New Configuration ([+] icon at the left top corner). Then you need to choose project type (probably Python in your case), specify your script (.py) file, parameters, Python interpreter to use etc. Once configuration is selected, you should be able to just run your application in debugger.
Refer to Debugging section in on-line help for more information.
HelloWorld code:
def main():
print "Hello World"
if __name__ == "__main__":
main()
I'd like to illustrate how to set parameters, as it took me a while to do this right:
Find the drop-down menu next to the "Run" button:
Choose the file you want to configure, then click "Edit Configurations":
Add script parameters: