How to show the error causing the ‘There has been a critical error on your website’?

Ahh! I found it.

If I did this:

phpinfo();
die();

Then I could see that ‘display errors` was set to off.

So if I added this in the top of my functions.php: ini_set('display_errors', 1);, then it started showing the errors.