0

I have developed a Java azure function and deployed it through IntelliJ(with Azure toolkit plugin support). I can do local run/debug on the function app from ide, as it nicely supports local run/debug.

Now the question is, Is there any way to debug code(or jar) that is deployed on Azure function(not sure if this has to be called remote debugging)? I searched through internet, was only seeing options to debug the app that is under development in ide(i.e., local code), but not able to find a way for deployed version. Is it possible to do this? or am I over-expecting from ides?

sp14
  • 120
  • 10
  • You are right, it is needed to use remote debugging. Start the deployed app in [debug mode](https://stackoverflow.com/a/138518/8203759) and attach your IDE to it via "Remote Application" run configuration – Konstantin Annikov Feb 14 '22 at 07:10
  • Referred link for debug mode; but couldn't find how I can control that in Azure portal. Can you please throw some light on how I can enable this for Azure functions? – sp14 Feb 14 '22 at 11:16
  • In [function properties](https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-maven-intellij#manage-function-apps-from-idea) insert java options from run configuration as shown [here](https://i.imgur.com/qSHkfze.png). Syntax is like [that](https://github.com/Azure/azure-functions-java-worker/issues/171#issuecomment-488521080) – Konstantin Annikov Feb 15 '22 at 03:27

1 Answers1

1

Currently, it is not possible to Remote Debug the function app with Intellij IDE.

Here is the workaround I tried to do Remote Debugging of azure Function using Intellij IDE.

After Deploying your function app into azure we can debug using (REMOTE DEBUG) while enabling it into the Azure portal. That is possible only in Visual Studio only.

enter image description here

After enabling Remote Debug in the Azure portal. The port of related visual studio can enable after enabling this Remote Debugging feature. I tried to add the Visual Studio debugging port like (VS19 - 4024) remote debugger port assignments & other visual studio port.

I end up unable to open the port.

enter image description here

Note:

In Azure except for the 8080/443 port, other ports are blocked in Azure.

Delliganesh Sevanesan
  • 4,146
  • 1
  • 5
  • 15
  • Thank you for the information. However, I couldn't try this approach yet. I will give it a try and update here – sp14 Feb 24 '22 at 09:41