5
votes

I'm on Mac OS X 10.8 and I've installed latest stable Python 3 (3.2.3) using Homebrew. Then I created a virtual environment using virtualenvwrapper - mkvirtualenv --no-site-packages --python=/usr/local/bin/python3 py3 I've configured Pycharm to use this virtualenv and I can run scripts, but I can't debug them, when I press debug Pycharm's debugger just quits:

/Users/qweqwe/.virtualenvs/py3/bin/python /Applications/PyCharm.app/helpers/pydev/pydevd.py --multiproc --client 127.0.0.1 --port 61596 --file /Users/qweqwe/Dropbox/Works/test/python/asyncore_test.py
pydev debugger: process 84441 is connecting
Connected to pydev debugger (build 117.663)

Process finished with exit code 132

Am I missing something or Pycharm just can't debug python3?

Update: It doesn't work at all, no matter what the script is. Even when debugging single line hello world debugger exits with error

2
It doesn't work even with simple hello world scripts with single line like print("Hello, I'm python 3!") - Alexander Petrovich
This seems like a question of how to use an IDE, or possibly a bug report, and not actually a programming question per se. - Lennart Regebro
@LennartRegebro, such questions are OK per this site FAQ: software tools commonly used by programmers. - CrazyCoder
Could you please set environment variable PYCHARM_DEBUG=True in you run configuration, debug your script and attach output to provided issue. - Dmitry Trofimov

2 Answers

2
votes

Yes. enter this in pycharm settings/Library/Frameworks/Python.framework/Versions/3.2/bin/python3(copied from Python3/MacOSX integration into pycharm)

0
votes

I had the same problem yesterday,and you can try in this way: add

if __name__ == '__main__': 

in your code , then set breakpoints and run Debugger.