Unable to find utility “instruments”, not a developer tool or in PATH

An error occurred while debugging a project on ios

unable to find utility “instruments”, not a developer tool or in PATH

error cause:

The default version
is not set when xcode has been upgraded or when multiple versions of xcode coexist

solution:

Open up Xcode and select

Go to Locations, and select the version you want to use in Command Line Tools

At this point, exit Xcode completely and try run-ios again. Everything is ok!

Read More: