How do I debug KDE Plasma startup?

When I upgraded from Fedora 34 to Fedora 36 I found I couldn’t start KDE anymore. I run startx, and a few seconds later X dies. This is only a problem with KDE. xfce works fine. Furthermore if I create a new user account KDE starts up in it just fine, so there must be a problem in my KDE settings or saved session somewhere. How do I debug this? There is nothing useful in the Xorg log.

I don’t use kde, but with gnome there are some config files (possibly hidden) under the user directory. Specifically in ~/, ~/.config, and possibly ~/.local
Those files could be removed and restarting would rebuild them properly (or at least compared to the exact same files in the new user account and the errors fixed).

This sounds as if something that worked in F34 does not in F36.

Also be aware that F36 is going EOL in a couple weeks so you might consider upgrading to either 37 or 38 really soon.