2

我根据说明设置了我的 Aptana Studio 3 / PyDev 调试器,甚至达到了一切正常的地步,包括断点和自动重新加载。爱它。现在,截至上周六的更新,调试器不再工作。我注意到

Aptana Studio 3/plugins/org.python.pydev.debug_x.x/pysrc

文件夹不见了。我找到了另一个pysrc文件夹

Aptana Studio 3/plugins/org.python.pydev_x.x

它似乎包含所需的pydevd模块,以及patch_django_autoreload()功能和所有内容。但是如果我把它放在 Python 路径上,我只会得到一个丑陋的堆栈跟踪,以

OSError: [Errno 2] No such file or directory

任何想法这里出了什么问题?在 OS X 10.7.4 上使用 Aptana Studio 3.2.0.201206251729、Django 1.3.1、Python 2.7.1。

编辑完整的追溯:

Executing process on new console: /usr/bin/python /Users/timo/Documents/aptana-studio-3-workspace/ssm/ssd/manage.py runserver 0.0.0.0:8000
Warning: to actually kill the created console, the parent process (in Eclipse console) must be killed first.
Traceback (most recent call last):
  File "/Users/timo/Documents/aptana-studio-3-workspace/ssm/ssd/manage.py", line 22, in <module>
    execute_manager(settings)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 67, in handle
    self.run(*args, **options)
  File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 76, in run
    autoreload.main(self.inner_run, args, options)
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc/pydevd.py", line 1175, in main
    return original_main(main_func, args, kwargs)
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 138, in main
    reloader(main_func, args, kwargs)
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 116, in python_reloader
    sys.exit(restart_with_reloader())
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc/pydevd.py", line 1212, in restart_with_reloader
    popen = subprocess.Popen(args, env=new_environ)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

编辑 2一些更多的调试信息,根据要求:

args: ['xterm', '-e', '/usr/bin/python', '/Users/timo/Documents/aptana-studio-3-workspace/ssm/ssd/manage.py', 'runserver', '0.0.0.0:8000']

new_environ: {'PYTHONIOENCODING': 'UTF-8', 'RUN_MAIN': 'true', 'VERSIONER_PYTHON_PREFER_32_BIT': 'no', 'LOGNAME': 'timo', 'USER': 'timo', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/Users/timo', 'DISPLAY': '/tmp/launch-Hsa1eC/org.x:0', 'SHELL': '/bin/bash', 'TZ': 'Europe/Vienna', 'VERSIONER_PYTHON_VERSION': '2.7', 'SECURITYSESSIONID': '186a5', 'GL_ENABLE_DEBUG_ATTACH': 'YES', 'PYDEV_CONSOLE_ENCODING': 'UTF-8', 'com.apple.java.jvmTask': 'JNI', 'PYTHONPATH': '/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc/pydev_sitecustomize:/Users/timo/Documents/aptana-studio-3-workspace/ssm/ssd:/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC:/Library/Python/2.7/site-packages:/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc', 'SSH_AUTH_SOCK': '/tmp/launch-ILkkCc/Listeners', 'CELERY_LOADER': 'djcelery.loaders.DjangoLoader', 'Apple_PubSub_Socket_Render': '/tmp/launch-GuOmAI/Render', 'TMPDIR': '/var/folders/yw/7q8d2tzj70q1yqwwqhgkqsw00000gn/T/', 'APP_ICON_844': '../Resources/aptana.icns', 'PYDEV_COMPLETER_PYTHONPATH': '/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'Apple_Ubiquity_Message': '/tmp/launch-lxY2Pu/Apple_Ubiquity_Message', 'DJANGO_SETTINGS_MODULE': 'ssd.settings', 'COMMAND_MODE': 'unix2003'}

这里有两点需要注意。1)我试图检查 PYTHONPATH 上的所有内容是否确实存在。大部分情况都是这样,除了/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zipand /Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc,这让我想知道我是否只需要让 Aptana 重新扫描 Python 目录。2) Aptana 应用程序路径包含空格(默认情况下)。我见过一些罕见的情况,任何类型的图书馆仍然对此感到窒息。

4

3 回答 3

1

org.python.pydev.debug/pysrc 真的被删除了(正确的是你发现的 org.python.pydev/pysrc)......将更新主页以反映这一点:)

所以,有了这个它应该可以工作......现在,至于你的错误,请发布完整的错误日志(只有那部分,很难知道可能发生了什么 - 用那个路径在这里测试它并且它确实有效适当地)。

于 2012-07-03T11:55:40.660 回答
0

我也遇到了这个问题,刚刚升级到 PyDev 3.4.1,它为我解决了问题。如果您仍然遇到问题,请通读http://pydev.org/manual_adv_debug_console.html 。

于 2014-03-30T08:30:20.567 回答
0

不确定是否相关,但我使用 pydev 将 eclipse 从 3.6 升级到 4.2,将 Aptana 从 2 升级到 3 现在我的调试器无法正常工作。升级 eclipse、aptana、pydev、Debugger 后不工作

于 2012-07-09T15:10:04.570 回答