graalpython icon indicating copy to clipboard operation
graalpython copied to clipboard

Python IDEs and Tools Compatibility

Open fniephaus opened this issue 2 years ago • 3 comments

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

  • Build dedicated IDE/editor extensions for GraalPy support.
  • Build a new IDE for GraalPy

fniephaus avatar Sep 19 '22 09:09 fniephaus

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

  • Does it provides autocompletion for Java in python?
  • Can we debug it using these tools?

ahmednrana avatar Jul 16 '24 15:07 ahmednrana

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.

timfel avatar Jul 16 '24 16:07 timfel

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.

msimacek avatar Jul 16 '24 16:07 msimacek