Testing with console output for multiple devices (iPhone/iPad) at the same time with Xcode

妖精的绣舞 提交于 2019-12-04 10:41:33

问题


Is it possible to debug / run Xcode iPhone/iPad application project with multiple testing devices at the same time and see console outputs for all of them? I am developing bluetooth application and I would like to test it in full activity mode, being able to see NSLog, etc.. in console for at least 2 connected devices.

I can see that Xcode 4 provides possibility to run multiple debug sessions at a time, but console outputs only logs for one of them. Is there a way to set up Xcode (some build/run settings in the scheme) to be able to see logs for multiple testing devices connected and debugged at the same time?


回答1:


There doesn't seem to be a nice way of doing it. One hack that I've found is that if you have two instances of Xcode running, you can have two Organizer windows open, each viewing a different log

Launch the 2nd instance using Terminal:

open <path to Xcode.app>/Contents/MacOS/Xcode




回答2:


I know this is an old question, and the above method of using the console works, but I just discovered a method I like better (I don't really like working with two windows all the time, especially with full screen Lion).

Run the debugger on both devices, then you can switch between the two just above the logging console.

Select your device and it will show the corresponding logs below




回答3:


Another option is: Connect your two devices. In XCode navigate to Window -> Organizer. You'll see a list of all connected devices. And here you can click on your second device and select Console. Good thing is, you see the two Console windows at the same time!



来源:https://stackoverflow.com/questions/5557633/testing-with-console-output-for-multiple-devices-iphone-ipad-at-the-same-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!