问题
Simple question but couldn't find a clear answer anywhere. Do i have to create a new run/debug configuration every time i create a new project, and assign the .py file at "script" or is there a way to make pycharm do this automatically. Would love to know! Thanks in advance :)
回答1:
You need to create new run/debug configuration in every new project based on pre-defined templates.
However you can edit a template
so that some of the values will be set by default.
Here is the information on how to change defaults.
You can also use temporary run/debug configurations.
回答2:
You can run a .py file directly without manually creating a Run/Debug Configuration. To do so, right click on the file in the Project view and select either the Run or Debug option from the context menu.
来源:https://stackoverflow.com/questions/46962868/pycharm-run-debug-configuration-saved-as-default