What steps would you take to debug a web application that is not functioning as expected?

Technical