How to debug issues with Azure Web Apps Part 1 – using Kudu
At work we have 2 Azure WebApp’s in 2 different regions in the world, we deployed the same code using a CI/CD pipeline and in one region the website returns a 404 error message.
So the following is some information and things I started looking into in order to try to diagnose the problem.
The website uses Azure Traffic Manager so that users in one part of the world get directed to lets say webapp1 and the others go to webapp2 (the one which isn’t working), we also have a custom domain name for our site and I mention this so that I can use something called Kudu.
Kudu what is that you ask? – well you can learn about Kudu here: – Kudu
Ok back to the problem at hand.
So to use kudu you add .scm. before the azure web app name like so https://<your web app name goes here>.scm.azurewebsites.net/ into a browser
This in our case looks like so: –
So what can I get out of using Kudu, it turns out you can find out quite a fair bit of information around your running webapp.
Here is a quick list of what you can find out using just the environments tab within kudu
- System info
- Connection Strings
- Environment variables
- HTTP Headers
- Server Variables
Allows you to choose CMD (a command window) or PowerShell window where you can actually see the list of files on the server where the webapp is running and do loads more.
Or if you prefer PowerShell instead.
This is very cool as you can see the list of files you have deployed, check version numbers and do all manner of things including the following:-
- View the System Files
- Add folders and files
- Delete / Edit / Download individual files
So who says you don’t get access to the files on your Azure WebApp deployment 🙂
- View the running processes on the server
- Get a memory dump of processes
- Diagnostic Dump
- WebJobs Dashboard
- Zip Push Deploy
- Download Deployment Script
View a list of extensions you’ve added to your Azure WebApp
I am off to go poke around and use these tools to see what I can find.
In the next post I will show you how to setup and use diagnostic logs to look more into the actual issue I am facing, but for now enjoy Kudu.