In Xcode 15, the checkbox for "Connect via network" is grayed out and cannot be unchecked. However, I would like to disable it because debugging via network is too slow for me.
Does anyone have an idea how I can disable this?
In Xcode 15, the checkbox for "Connect via network" is grayed out and cannot be unchecked. However, I would like to disable it because debugging via network is too slow for me.
Does anyone have an idea how I can disable this?
Last week Apple published TN3158 Resolving Xcode 15 device connection issues that addresses this topic in depth.
IMPORTANT While this technote is associated with changes in macOS 14.4 and Xcode 15.3, both currently available as release candidates, installing these builds will not automagically fix all device connection problems. Read TN3158 for more backstory on this.
Because I want to separate the pre- and post-TN3158 discussion of this issue, I’ve locked this thread. If you have more to say on this subject, I’ve created a new thread for that discussion, namely Xcode 15.3 device connection issues.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Pre-TN3158 bugs
FB13198191
FB13203790
FB13204677
FB13208687
FB13210513
FB13211128
FB13231882
FB13246000
FB13256031
FB13267950
FB13278689
FB13350507
FB13380011
FB13474705
FB13513987
FB13601388
Revision History
2023-03-05 Made major changes to reference TN3158.
2024-02-09 Added more bug numbers.
2024-01-09 Added more bug numbers.
2023-11-09 Added more bug numbers.
2023-11-08 First posted.
Can you point more precise than "Xcode Release Notes"? I'm unable to find anything related in the changelog from "Xcode 15.1 Beta 2 Release Notes" or "Xcode 15.0.1 Release Notes"
What if Apple "keeps this professional" and does not take such radical decisions that affects hundreds of thousands of people. Loading apps on device and debugging is extremely slow, and I've lost hours of works because of this. Guessing by the comments here, tons of feedback has been received by Apple, even from the beta stage, yet Apple released this crawling Xcode.
Using and debugging with Xcode is now so pain in the *** that I seriously consider using another tool and Apple answer is not an answer !
Get an Application Firewall such as LuLu and disable all connections for Xcode.
I had this issue and posted here earlier. I thought Apple rolled something out that fixes this, as I've not had this in a few weeks now. Currently running Version 15.0.1 (15A507) iPad 10.5 Pro iOS 17.1.1 (21B91). Not sure what changed to me, but debugging over USB is back to regular speeds and even wireless debugging is fast now. Not sure what happened so I expected all the recent messages here to be the same :/
My iPhone 15 Pro annoyed me by always connecting to Xcode automatically. This worked for me in getting of this device from the automatic perspective of Xcode:
Be sure the device is not connected with a USB cable. In the Devices and Simulators
window, you should have some kind of a round "network" icon to the right of the device's name.
Right-click on the device and choose Unpair Device
from the menu.
At least in my case, the iPhone 15 Pro disappeared from the Xcode sidebar and didn't appear again upon restarting Xcode.
When I actually wanted to connect this device to work with it, I connected it with a USB-C cable and Xcode worked perfectly with it.
Your mileage may vary.
I meant to write:
This worked for me in getting rid of this device from the automatic perspective of Xcode
Same, Xcode debugging on iOS 17 device is unusable. Works ok on older iOS devices though. - Apple, fix this.
How can we test offline functionality now? I used to just switch to airplane mode to mimic loss of network and then disable airplane mode again to be back online. What happens now, is that I loose the connection to the debugger and the console output, when doing so. It took me a while to even understand, that it is not my apps fault, that the connection to the debugger keeps on dropping and the apps gets killed, as if it would crash, but without any crash logs... Unfortunately I do not have enough hair left, which I could pull out over this issue.
I am not even talking about the annoyance, when waiting for the deugging session to finally start.
I am not able to do my work properly and haven't found a way around it yet, does someone have some sort of "trick" to debug offline mode?
How can we test offline functionality now?
Try this:
Turn on Airplane Mode.
Run your app from Xcode.
Turn off Airplane Mode.
Run your test as you did before (that is, do some networking, turn Airplane Mode on, make sure your app responds properly, turn it back off again, and so on).
This works because, when Airplane Mode is on, Xcode is forced to use the USB network interface in step 2, and it sticks with that interface throughout the debugging session.
Obviously this is less than ideal, so I’d appreciate you filing a bug about this case too. Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
works
Hi @eskimo, is that problem solved in Xcode 15.1 - RC (15C65) brand new version? I couldn't find any info regarding that issue.
Thank you so much for your help, @eskimo Very much appreciated. While it works at first, unfortunately the connection still drops after a while, even if I started debugging in flight mode. :-( The app is terminated, so I can not even re-attach it to the debugger, as the app session is terminated and this the app is restarted. But even after restarting the app and trying to attach it to the debugger Xcode stays for ever in "Waiting to attach to AppName on iPhone" mode.
I have the same problem, the application will just not install on the device. It seems to work if I disable the Wifi and Bluetooth on the iPhone but as others have said this is not really a solution. I don't understand why the checkbox that would (probably ?) fix the issue is greyed out in XCode, what is the point of displaying it in the UI if we are not allowed to use it ?
Do we have any updates? Besides the two issues mentioned by @florian_buerger
Why is that checkbox greyed out? Why is debugging slow?
I'm also seeing an issue where debug session take a long time to configure the device and sometimes I get errors that I will attach once I get a screenshot of them.
On an AnyConnect VPN setup, disabling Bluetooth, WIFI, and Data has no effect unless you disconnect the VPN. Making this thing exclusive to the network is crazy. What if all this traffic leaves the local network before reaching its internal point-to-point target because of how a given network is configured? USB 3+ and Thunderbolt 2+ are more reliable in the form of a cable connection. If it's not broken, don't change it.
The new debugger also has issues with the simulators. After 5 or 6 plus app launches, the sim will black screen and not load the app or sometimes when you close the app via Xcode, the sim will black screen and refuse to launch. Killing the simulator disconnects some debugger processes and then you're able to resume running on the sim.
The new debugger also has issues with the simulators.
I’m not sure what’s going on there but it’s likely a separate issue from the one being discussed here. Please start a new thread about it. Tag it with Debugging so that I see it.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Xcode 15.1, iOS 17.2 – no updates. The "Connect via network" is still unable to uncheck.
I cannot connect my iPhone and debug with XCode 15.1, it's always say "Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated." Apple please fix it.
I am blocked. In manage run destinations I get "Waiting to reconnect to myiPadName" "Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated."
I have tried (I didn't restart mac of iPad after each of these, not sure if that would make a difference)
first iPad iOS 17.2, second iPad 17.1.1 xcode : 15.1 macOS : 14.2
I have tried xcode beta 15.2 not all the options but looks to be the same.
The only other option that I can see if to either reinstall xcode on a clean machine or restart after each each test. Not sure what else to do. And being blocked is not a great feeling. Any option is a good option at the moment.
created feedback to apple refer FB13474705
Thanks filing FB13474705
.
The answer to the first is straightforward: iOS 17 has new debugging infrastructure such that all debugging goes over the network. That’s not the same thing as going over Wi-Fi. If you have the device attached via USB, the network requests will go over a virtual network interface running over USB.
If the new architecture of iOS17 is entirely network based, then there is actually a reason to explain this behavior, it requires a usb shared network to be established when using a usb connection to Xcode, however on the iPhone a usb shared network conflicts with wifi, you can only use one of them at a time and wifi has a higher priority. When you manually turn off wifi, the usb connection still doesn't automatically become a usb network, because your Mac is connected to wifi at the time, and when the Mac's wifi is turned off, the usb connection officially becomes a shared usb network, and takes significantly less time to transfer, and shows the shared network logo on the iPhone.
This is just a hypothesis, but at least for me, Xcode worked fine after the usb shared network was established.
Would love a solution here as well !
I have to disconnect my iPhone from the wifi if I want to debug, because even if plugged, debugging seems to prioritize network over usb. It also seems to slow down all my network connections on my phone which is a bummer.
I observed a clear regression from beta 8, it was way faster on the prior iOS 17 / Xcode 15 betas.
Same, it's absolutely killing me how slow app launches and debugging are.
+1