简体   繁体   中英

Does Pycharm debug work with python3?

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM