Search code examples
pythonpycharm

Set Breakpoints in PyCharm


I'm using pyCharm for the first time today. I'm running a very simple program and I'm trying to set a breakpoint. I can't set a breakpoint no matter what I do, and it seems like almost everything under the Run menu is greyed out. Is this feature disabled in the Community version of PyCharm? This seems like a very desirable feature to have access to, but everything on my system seems to be shut off? Even when I Google for solutions, I get lots of hits, but none of the recommendations actually works for me. Any thoughts?

enter image description here enter image description here


Solution

  • Let Pycharm recognize your file as .py file, by editing filename to scratch.py.
    There is highly chance that Pycharm doesn't recognize the file type, then it can't correctly configure an interpreter for it. If rename doesn't work, try to manually set the configuration, (in this pic is the dropdown arrow near preprocess) here