0

I recently upgraded my PyDev plugin to version 5.7.0.20170411357. It seems IronPython is no longer supported.

I'm using Eclipse Oxygen

Does anyone have a workaround?

When starting the debugger the following message is displayed: RuntimeError: Unable to proceed (sys._current_frames not available in this Python implementation).

Yes, I am adding the Vm argument -x:Frames.

The error is thrown from pydevd_additional_thread_info_regular.py There is an accommodation for 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).')

else: _current_frames = sys._current_frames

Bill Kidd
  • 1,130
  • 11
  • 13

0 Answers0