If you use an simulator that you have not used before, or erase the simulator, you will get a black background and lock screen, unable to debug the lock screen widget.
I don't know why Xcode has such a serious bug, and now debugging the lock screen widget can only be real iPhone