substratevm/src/com.oracle.svm.jdwp.server/README.md
For a user oriented documentation see JDWP.
The default configuration is that the JDWP server is another shared library built with Native Image. However, to ease debugging the debugger, it is possible to run the JDWP server on HotSpot.
An additional non-standard mode is available to enable that:
-XX:JDWPOptions=...,mode=jvmlib:svmjdwpRun mx --native-images=lib:svmjdwp build to build the library.
Add the -H:+JDWP option to the native-image command:
mx native-image -H:+UnlockExperimentalVMOptions -H:+JDWP -cp <class/path> MainClass ...
To build and include lib:svmjdwp as a build artifact, run:
mx --native-images=lib:svmjdwp native-image -H:+UnlockExperimentalVMOptions -H:+JDWP -cp <class/path> MainClass ...
Both commands produce a binary, an <image-name>.metadata file.