How to debug a container which is in a crash loop?

With running systemd inside the container deprecated, what is the best way to get shell access to a container which is in a crash loop?