diff --git a/python/helpers/pydev/pydevconsole.py b/python/helpers/pydev/pydevconsole.py index 5bac7550c86d..a15fd83bc94c 100644 --- a/python/helpers/pydev/pydevconsole.py +++ b/python/helpers/pydev/pydevconsole.py @@ -10,6 +10,7 @@ import os import sys from pydevd_constants import USE_LIB_COPY +from pydevd_constants import IS_JYTHON if USE_LIB_COPY: import _pydev_threading as threading @@ -86,10 +87,10 @@ class Command: @staticmethod def symbol_for_fragment(code_fragment): - if code_fragment.is_single_line: + if IS_JYTHON or code_fragment.is_single_line: symbol = 'single' else: - symbol = 'exec' + symbol = 'exec' # Jython doesn't support this return symbol def run(self): diff --git a/python/helpers/pydev/pydevd_constants.py b/python/helpers/pydev/pydevd_constants.py index 34759f7f999d..5e78e15d3a19 100644 --- a/python/helpers/pydev/pydevd_constants.py +++ b/python/helpers/pydev/pydevd_constants.py @@ -41,6 +41,10 @@ MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 1000 import os +import pydevd_vm_type + +IS_JYTHON = pydevd_vm_type.GetVmType() == pydevd_vm_type.PydevdVmType.JYTHON + #======================================================================================================================= # Python 3? #=======================================================================================================================