How do I debug applications?

This guide is to help with debugging applications that are deployed into Kubernetes and not behaving correctly: