Debug java azure functions in an local environment
Hi,
I'm trying to debug java azure functions in an local environment.
OS: Archlinux JDK: openjdk8 MVN: 3.5.2 Azure Functions Core Tools: 2.0.1-beta.31
If I use "mvn azure-functions:run", everything works as expected except there is no port for the remote debugging.
I didn't find somewhere an options for activating this locally. Is there one? Because if I define java options for the JVM, the outer JVM uses the debugging port and the internal JVM for the functions tries to use the same port for debugging -> error :)
Regards
Add the following to you local.settings.json:
"JAVA_OPTS": "-Djava.net.preferIPv4Stack=true -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005"
This is documented now. https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-maven-intellij#debug-the-function-in-intellij and https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-maven-eclipse#run-functions-locally-in-the-ide