oracle / graalpython

A Python 3 implementation built on GraalVM
Other
1.2k stars 104 forks source link

Python IDEs and Tools Compatibility #284

Open fniephaus opened 1 year ago

fniephaus commented 1 year ago

TL;DR

We plan to gradually improve support for popular Python IDEs and tools in GraalPy.

Goals

In addition to compatibility with popular Python packages (https://github.com/oracle/graalpython/issues/283), we also focus on compatibility with tools such as pdb and pyenv as well as with IDEs for Python such as VS Code or PyCharm. This should make it easier for Python developers to switch to GraalPy as their Python interpreter using their preferred set of tools.

Non-Goals

ahmednrana commented 1 month ago

Is there any update on this. Does pycharm / vscode work with Graalpy.

timfel commented 1 month ago

Is there any update on this. Does pycharm / vscode work with Graalpy.

* Does it provides autocompletion for Java in python?

No, this would need special extensions for these IDEs that go beyond supporting the existing Python tools, libraries, and IDEs. It's not that we won't do it, but it's not part of this ticket.

* Can we debug it using these tools?

Debugging with PyCharm works, VSCode unfortunately uses a fork call that cannot be supported on GraalPy and we have to work with the VSCode developers to add support for GraalPy.

msimacek commented 1 month ago

I think the question about debugging was also about Java code. It's not possible to debug both Java and Python with a single debugger. But it's possible to attach a Java debugger (from a Java IDE like IntelliJ IDEA) to the python process and then debug the Java parts separately. To do that you need to add --vm.Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y argument to the python invocation and configure remote debugging in the Java IDE to connect locally to port 8000. You can have both a Python debugger and a Java debugger attached to the same process.