Skip to content

Remote Debugging for Azure Functions

Hanxiao Liu edited this page Oct 20, 2022 · 3 revisions

Enable Remote Debugging

When enable remote debugging for Java functions in Azure toolkit, the following configurations of the selected Function App will be changed:

  • use32BitWorkerProcess will be set to false
  • webSocketsEnabled will be set to true
  • the following Application Settings will also be modified
    • HTTP_PLATFORM_DEBUG_PORT: 8898 (This will not change if you have an existing value)
    • JAVA_OPTS: -Djava.net.preferIPv4Stack=true -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=127.0.0.1:8898 HTTP_PLATFORM_DEBUG_PORT: ${HTTP_PLATFORM_DEBUG_PORT}
      • If you did not set JAVA_OPTS before, we will add the above options to your app settings, otherwise, we will just add up the missing part.

Disable Remote Debugging

When disable remote debugging for Java functions in Azure toolkit, the following app settings will be modified or removed

  • HTTP_PLATFORM_DEBUG_PORT
  • JAVA_OPTS
    • -Djava.net.preferIPv4Stack=true, -Xdebug, -Xrunjdwp:* will be removed from your JAVA_OPTS, if there is no more configuration left, JAVA_OPTS will also be removed from your app settings
Clone this wiki locally