Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode instruments v5.0 ""An error occurred while trying to run the script"

I have upgraded to xcode 5.0 and Instruments 5.0. Problem: Can not make a new recording / new script. It worked before upgrade.

How to recreate problem: - Make a new instance with the template "Automation" - Go to "script" - Choose "Add", then "Create". A code line "var target = UIATarget.localTarget();" is created as expected in the script pane. - click the red record button at the bottom of the script pane Simulator opens as expected (iPhone Regina (4-inch 64-bit)/iOS 7.0.3) Problem: in the script pane it says "Starting capture" and this does not stop and recording does not work. In the "Editor log" it says: "An error occurred while trying to run the script".

I have restarted Instruments, xCode and the computer a few times.

like image 703
Torill Andreassen Avatar asked Oct 30 '13 11:10

Torill Andreassen


2 Answers

This happened to me. Turns out the option to enable UI Automation was turned off in the Developer Settings on the phone. After turning the option on, the error went away and everything worked as expected.

Developer Settings - enable UI Automation

like image 200
Mia Clarke Avatar answered Jan 01 '23 07:01

Mia Clarke


Try this in terminal:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
like image 20
Nikos M. Avatar answered Jan 01 '23 08:01

Nikos M.