Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

Debug java azure functions in an local environment

Open ghost opened this issue 8 years ago • 2 comments

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

ghost avatar Jun 29 '18 14:06 ghost

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"

thijsvdbb avatar Aug 06 '18 09:08 thijsvdbb

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

MariusVolkhart avatar Feb 12 '19 04:02 MariusVolkhart