After I plugged my iPhone into my mac, I started debugging my app. For the first few days, it all seemed smooth.
But after a few days, things changed.
The Debug -> Attach to process menu is empty, as shown below. I can't figure out why.
But the weirder thing is that when I debugged my app three months later, the processes on my iPhone were correctly listed on the Attach to process menu, but they all disappeared again after a few days.
My device configuration is: iPhone 6 - iOS 12 - macOS Sonoma 14.3.1 - Xcode 15.2
I can't wait a few months before I have a chance to debug my app. So I had to ask for help here.