PyDev 5.7.0.20170411357不再支持IronPython

时间:2017-05-03 14:38:52

标签: pydev ironpython eclipse-oxygen

我最近将我的PyDev插件升级到版本5.7.0.20170411357。 似乎不再支持IronPython。

我正在使用Eclipse Oxygen

有没有人有解决方法?

启动调试器时,将显示以下消息: RuntimeError:无法继续(sys._current_frames在此Python实现中不可用)。

是的,我正在添加Vm参数-x:Frames。

从pydevd_additional_thread_info_regular.py抛出错误 Jython住宿。

if not hasattr(sys, '_current_frames'):

# Some versions of Jython don't have it (but we can provide a replacement)
if IS_JYTHON:
    from java.lang import NoSuchFieldException
    from org.python.core import ThreadStateMapping
    try:
        cachedThreadState = ThreadStateMapping.getDeclaredField('globalThreadStates') # Dev version
    except NoSuchFieldException:
        cachedThreadState = ThreadStateMapping.getDeclaredField('cachedThreadState') # Release Jython 2.7.0
    cachedThreadState.accessible = True
    thread_states = cachedThreadState.get(ThreadStateMapping)

    def _current_frames():
        as_array = thread_states.entrySet().toArray()
        ret = {}
        for thread_to_state in as_array:
            thread = thread_to_state.getKey()
            if thread is None:
                continue
            thread_state = thread_to_state.getValue()
            if thread_state is None:
                continue

            frame = thread_state.frame
            if frame is None:
                continue

            ret[thread.getId()] = frame
        return ret
else:
    raise RuntimeError('Unable to proceed (sys._current_frames not available in this Python implementation).')

否则:     _current_frames = sys._current_frames

0 个答案:

没有答案