GraalVM Tools for Java Extension
You want the power of Java and the simplicity of VS Code? Improve your developer productivity by leveraging GraalVM in VS Code.
The GraalVM Tools for Java extension provides full-fledged support for the Java language. It also includes the power of GraalVM, full debugging capabilities, polyglot support, and lightning-fast just-in-time as well as ahead-of-time compilers - all without ever leaving the comfort of VS Code.
The GraalVM Tools for Java extension performs the work of several extensions in one. Key features include:
This extension makes VS Code a comfortable and convenient integrated development environment for GraalVM developers. Let's get started!
To install the GraalVM Tools for Java extension in VS Code:
GraalVM Installation Wizard
After installing the extension, you can install GraalVM by using the built-in installation wizard (click the Gr icon in the left side Activity Bar).
When working behind firewall it is necessary to set the proxy for GraalVM Installation wizard and components installation so these features work properly. The extension will ask for setting this initially. Set:
For more information about GraalVM installation and setup, consult the extension documentation.
Java Development and Debugging
The GraalVM Tools for Java extension brings complete support for Java language development and debugging in VS Code, including popular features such as auto completion, code navigation, refactoring, and so on.
Any application that runs on a JVM can run unmodified on GraalVM. GraalVM includes a JDK based on the Java HotSpot VM, and integrates an optimizing, just-in-time (JIT) compiler, written in Java: the Graal compiler.
There are several launch configurations available by default, and you can add more. Take a look at the extension documentation to learn more.
Integration with VisualVM
GraalVM Tools for Java extension provides integration with VisualVM, the all-in-one Java (and polyglot) monitoring and troubleshooting tool. VisualVM brings powerful, yet easy-to-use, visual Java tooling to VS Code.
For more information, see the dedicated guide about VisualVM and VS Code integration using the extension.
Support for the Micronaut Framework
In combination with the GraalVM Tools for Micronaut extension, you can create Micronaut projects, run and debug them directly from VS Code with different debugging protocols. This native support for the Micronaut framework enables you to build a native executable of your Micronaut project using VS Code.
Moreover, you can build a Docker image with the application artifacts, or even build a Docker image containing an executable generated by GraalVM Native Image and deploy it in a container.
See the GraalVM Tools for Micronaut extension documentation to learn more.
The GraalVM download includes GraalVM Native Image, which enables you to compile your Java application ahead-of-time compile into a native executable - directly in VS Code. Only the code that is required by the application at run time will be compiled and linked into the final native executable. The advantages are many.
Your application will:
With GraalVM Tools for Java extension you can turn your Java projects into native executables directly in VS Code. Learn how you can do that from the extension documentation. Read more about GraalVM Native Image here.
Native Image Debugging
The GraalVM Tools for Java extension provides Java-like debugging of a native executable in a running state directly from within VS Code. You can set breakpoints, inspect the state of your application, even attach the debugger to a Native Image process in VS Code and step over the Java application source code!
Read more about this and find a demo application in the Native Image Debugging guide.
Polyglot Programming and Debugging
Built-in Implementation of Debug Adapter Protocol (DAP)
Thanks to the built-in implementation of the Debug Adapter Protocol (DAP), a user can choose a debugging protocol in VS Code by selecting either
See the documentation for more information on Polyglot Programming and Debugging in VS Code.
Provide Feedback or Seek Help