Replies: 1 comment 1 reply
-
GraalPy does support inspect. When you're embedding into Java, you need to add a dependency on it: <dependency>
<groupId>org.graalvm.tools</groupId>
<artifactId>chromeinspector-tool</artifactId>
<version>${graalvm.version}</version>
</dependency> Then you can enable inspect on the context builder with a port number as an argument: .option("inspect", "5555") All the other GraalVM tools like cpu sampler or insights should work as well, you just need to add the appropriate dependency. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I debug graalpy when invoked by Java?
I'm seeing that 24.0.2 release of graalpy doesn't support --inspect option as written in this reference page.
If there's a way to do this, great -- but now lets say I want to add Java context to the scripting engine.
Is there not a way to add built-ins before I start this script, and then debug it?
This type of tooling is pretty solidly available for CPython and its C/C++ APIs. While I do see the advantage in working with graalpy via the archetypes in maven/gradle, I don't see much other advantages. In fact, I'm inclined to say writing big infrastructure this way and depending on this experimental stuff without proper tooling is hard to envision a future for.
The alternatives I've already found includes:
I can see that this can go far and I am looking for Java-related technologies just like this. But I just think the advantage of implementing Python using graalvm can't be just speed. It has to be about re-using customized Java code in Python in rapid prototypes.
If it can't be done that way, then, unfortunately, being able to invoke some custom python only through mvn or gradle is not enough for me to go down this road. I need the tooling because if I write python code that is meant to run in an embedded manner, it will definitely require maintenance.
Beta Was this translation helpful? Give feedback.
All reactions