1.Cable IPhone to macOS
2.Open xcode15 and click Window->Devices and Simulators
Select Devices on the left to see the connected IPhone, and then click Connect via network to select..
When selected, an Earth icon appears to the right of the IPhone device on the left, indicating a successful network connection to the IPhone
The data cable can now be disconnected, so the IPhone device can be debugged remotely.
Note: IPhone and macOS need to be on the same LAN.
4.Open or create an iOS project, and click Debug Device List. You can see that the iPhone device has the Earth icon symbol, indicating that it is a remote device connected through the network.
Start Remote Debug
Successful remote debugging and breakpoints are as follows
This document is transferred from https://blog.csdn.net/fittec/article/details/131838429,If there is any infringement,Please contact to delete。