How to make UIAutomation, Simulator and Xcode Debugger work at the same time?

Can someone point me to the documentation on how to get Tools to run UIAutomation scripts and launch an iPhone application using a debugger running in Simulator?

Limitations: I only have iPhone 3g equipment for testing and debugging a device with UIAutomation, which simply does not work reliably. Typically, test scripts just run to make sure everything passes, but now there is a strange error that only runs when the UIAutomation script is run (which is good). The error is not duplicated in manual mode. It seems that in any case, it is not necessary to attach the UIAutomation tools to a process already running in the simulator. No choice. UIAutomation's starter tools do not directly force it to start with a debugger.

I would suggest that there is some kind of command line mask that can be configured in the active target "Tools" (environment variable, arguments, working directory) for this to happen, but I did not find the magic paragraph.

Thanks Neil

+4
source share
1 answer

This also puzzled me a lot - especially when Automation Instrument is selected, the Instruments application clearly says Current instrumentation disallows attach. The key is to realize that the application running in the simulator is visible on your host system as its own process, so the application directly from GDB works well. These instructions are for Xcode 4.2 (4C199) on Snow Leopard 10.6.8:

  • Run your test in Tools, as usual (either directly from the tools, or from Xcode 4 Product -> Profile). Select any templates and scripts to perform your automatic test.

  • Xcode, Product -> Attach to Process iOS, , -. , , , , Likely Targets.

  • , View -> Debug Area -> Show Debug Area, gdb.

  • (Product -> Debug -> Pause), . , , .

: NSLog() ? , - OS X Console app (/Applications/Utilities/Console.app) DATABASE SEARCHES -> All Messages.

+4

All Articles