Using Kudu in Azure to Debug an Azure Function

April 03, 2024

I’ve written about Kudu previously. Essentially, it allows you to access the deployed version of your app. Sometimes, this can help with debugging - especially in situations where you deploy something, and then nothing happens - i.e., you don’t get an error, but the app doesn’t work.

In order to access Kudu, you simply select Advanced Tools, and then go to the Debug console menu (see the above linked post for a more detailed explanation).

This post specifically focuses on Azure Functions, but you can easily use the same mechanism to find out why your web app won’t start.

Once you’re in the console, you can navigate to:

\home\site\wwwroot

Which is where your function is running from. Now you can simply force it to run. For example, if your function is called TheJollyAardvark then look for a file in this directory called TheJollyAardvark.dll, then run it:

dotnet TheJollyAardvark.dll

Here’s an example:

Run the Azure Function

Obviously, errors like this won’t appear in App Insights, because they app itself won’t start, and so can’t log.



Profile picture

A blog about one man's journey through code… and some pictures of the Peak District
Twitter

© Paul Michaels 2024