Problem
The option to run or debug a script is missing when right-clicking on a .py file in PyCharm.
Cause
The .py file extension was removed from the Python file types in File | Settings | Editor | File Types. As a result, PyCharm does not recognize the file as a Python script and does not provide the Run/Debug option.
Resolution
To resolve this issue:
- Open PyCharm.
- Navigate to File | Settings | Editor | File Types.
- Add it manually by clicking on the + icon and entering
*.pyas below: - Apply the changes and restart PyCharm.
Comments
0 comments
Please sign in to leave a comment.