title: How to get UIAutomation, Simulator, and Xcode Debugger Running at the same time?
body: <p>Can anyone point me to the documentation on how to make Instruments run UIAutomation scripts and start the iPhone application with the debugger running in the Simulator?</p>
  
  <p>Constraints:
  I only have iPhone 3g hardware to test with and debugging against the device with UIAutomation just does not reliably work.
  Normally the test scripts are just ran to make sure everything passes, but now a weird bug exists that only gets triggered when the UIAutomation script runs (which is a good thing).  The bug cannot be duplicated in manual operation.
  There does not seem to be anyway to attach Instruments UIAutomation to a process already running in the simulator.  There is no selection.
  Starting Instruments UIAutomation directly does not cause it to start with the debugger.</p>
  
  <p>I would assume that there is some command line magic that can be configured in Instruments edit active target (environment variable, arguments, working directory) to make this happen, but I've not found the magic paragraph.</p>
  
  <p>Thanks,
  Neil</p>