-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example for embedding simple python scripts and debugging them using VSCode #13
base: main
Are you sure you want to change the base?
Conversation
b8d6ae6
to
e3c3cbc
Compare
e3c3cbc
to
9b75d60
Compare
## 4.3 Calling the Python script from Java | ||
|
||
`App.java` | ||
```java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I want to follow just the guide without looking at the reference solution, then this snippet is not enough. In other guides like the Micronaut/Spring guide we included even the large html listing just so that the guide itself is self-contained. We should probably be consistent in this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll expand the readme
|
||
```shell | ||
./mvnw compile | ||
./mvnw javafx:run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I followed the JavaFX quickstart from https://openjfx.io/openjfx-docs/#maven it did not generate the wrapper. Maybe this should be mvn compiler
etc. or mention something like "if you don't use Maven wrapper, the commands would be ...".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch, the project generated by javafx-archetype-simple
seem to be broken on many fronts...
- it sets
maven-compiler-plugin
to version3.8.0
, but that seems to be broken so one must manually update to at least3.8.1
- it generates
module-info.java
, so javac does module stuff and since polyglot is a proper module, one has to addrequires org.graalvm.polyglot;
to the generatedmodule-info.java
. - after fixing all that it fails in runtime on some Java module permission issue
All in all, maybe it's easier to not even mention this Java FX quickstart guide..?
|
||
![Gif animation of installing GraalPy with pyenv](./graalpy-vscode-pyenv.gif) | ||
![Gif animation of using GraalPy in VSCode](./graalpy-vscode-select.gif) | ||
![Gif animation of debugging with GraalPy in VSCode](./graalpy-vscode-debug.gif) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh. They haven't pushed the new version out, yet, and I still had my local changes that I pushed upstream. They updated the debugpy version in the extension to one with the fix (microsoft/vscode-python-debugger#505) but haven't pushed a new extension release
No description provided.