You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python version (& distribution if applicable, e.g. Anaconda): Jython 2.7.2
Using VS Code or Visual Studio: VS Code
Actual behavior
I was trying to debug jython program using vs code.
My plan is to start a debug server using debugpy, and launch vs code debug session in 'attach to' mode.
Codes are like:
D:\software\jython\bin\jython.exe -m debugpy --listen localhost:5678 --wait-for-client .\main.py
File "D:\software\jython\Lib\runpy.py", line 161, in _run_module_as_main
File "D:\software\jython\Lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "D:\software\jython\Lib\site-packages\debugpy\__main__.py", line 43, in <module>
File "D:\software\jython\Lib\site-packages\debugpy\server\__init__.py", line 9, in <module>
import debugpy._vendored.force_pydevd # noqa
File "D:\software\jython\Lib\site-packages\debugpy\_vendored\force_pydevd.py", line 37, in <module>
pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')
File "D:\software\jython\Lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "D:\software\jython\Lib\site-packages\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_constants.py", line 365, in <module>
from _pydev_imps._pydev_saved_modules import thread, threading
File "D:\software\jython\Lib\site-packages\debugpy\_vendored\pydevd\_pydev_imps\_pydev_saved_modules.py", line 97, in <module>
import thread; verify_shadowed.check(thread, ['start_new_thread', 'start_new', 'allocate_lock'])
File "D:\software\jython\Lib\site-packages\debugpy\_vendored\pydevd\_pydev_imps\_pydev_saved_modules.py", line 73, in check
msg = self._generate_shadowed_import_message([module.__file__])
AttributeError: type object 'org.python.modules.thread.thread' has no attribute '__file__'
I don't know if debugpy has loaded correct 'thread' module.
Or debugpy is no longer supported for Jython.
The text was updated successfully, but these errors were encountered:
Well, Jython was never officially supported in debugpy (it was never in the debugpy ci and it was removed from the pydevd ci some time ago).
Having said that, the support for Jython wasn't really removed from the debugger and if interested users do provide fixes those are applied.
i.e.: the fix from fabioz/Pydev@ac17851 is being ported to debugpy in #755, so, it may work again in a future release (you may also remove the start_new in your local version of _pydev_saved_modules.py to have it working)...
Now, it's possible that support for Python 2.7 is completely removed sometime, in this case, Jython won't be supported at all anymore as it doesn't really have a 3.x release.
Environment data
Actual behavior
I was trying to debug jython program using vs code.
My plan is to start a debug server using debugpy, and launch vs code debug session in 'attach to' mode.
Codes are like:
And I started debug server using:
Then just got an attribute error:
I don't know if debugpy has loaded correct 'thread' module.
Or debugpy is no longer supported for Jython.
The text was updated successfully, but these errors were encountered: