I'm new to Helidon MP and I'm trying to implement my first microservice. I wasn't able to find out how to debug my application, can someone point me to a good example or documentation? Is there a way to start the runtime in debug mode or something like this?
thanks in advance
Helidon MP is not really a runtime in the sense of being an application server. It's primarily a collection of libraries you add to your project. Therefore you debug programs that use Helidon like you would debug any other Java application, i.e. by adding Java debug switches to the command line.
Here is the output from java -agentlib:jdwp=help
, which should get you started with basic Java debugging:
$ $(/usr/libexec/java_home -v11)/bin/java -agentlib:jdwp=help
Java Debugger JDWP Agent Library
--------------------------------
(see http://java.sun.com/products/jpda for more information)
jdwp usage: java -agentlib:jdwp=[help]|[<option>=<value>, ...]
Option Name and Value Description Default
--------------------- ----------- -------
suspend=y|n wait on startup? y
transport=<name> transport spec none
address=<listen/attach address> transport spec ""
server=y|n listen for debugger? n
launch=<command line> run debugger on event none
onthrow=<exception name> debug on throw none
onuncaught=y|n debug on any uncaught? n
timeout=<timeout value> for listen/attach in milliseconds n
mutf8=y|n output modified utf-8 n
quiet=y|n control over terminal messages n
Obsolete Options
----------------
strict=y|n
stdalloc=y|n
Examples
--------
- Using sockets connect to a debugger at a specific address:
java -agentlib:jdwp=transport=dt_socket,address=localhost:8000 ...
- Using sockets listen for a debugger to attach:
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y ...
Notes
-----
- A timeout value of 0 (the default) is no timeout.
Warnings
--------
- The older -Xrunjdwp interface can still be used, but will be removed in
a future release, for example:
java -Xdebug -Xrunjdwp:[help]|[<option>=<value>, ...]