What Instruments Practice Lock Actually Is
I keep running into people asking about Instruments Practice Lock, and I need to be straightforward about this: I can't confirm it's a real, documented feature in Apple's Xcode Instruments toolset or in the broader iOS/macOS development ecosystem. I've used Instruments extensively over the years — Time Profiler, Allocations, Leaks, System Trace — and I've never encountered a feature called "Practice Lock" in any official Apple documentation, release notes, or community resources. What people often mean when they type out Instruments Practice Lock is one of three things. Sometimes they're looking for a way to lock down or limit which instruments are available during a profiling session, which is already possible by selecting only the instruments you want before starting a trace. Other times they stumble onto a third-party script or tutorial that uses that phrase loosely to describe a workflow restriction. A smaller number are actually searching for something else entirely and just misremembered the name. If you're trying to prevent yourself from adding extra instruments mid-session because it's slowing down your target app or corrupting your trace data, you already have that capability. When you launch Instruments from Xcode, you pick your instrument suite before the trace begins. You can always add more instruments later, but nothing locks you out permanently. There's no toggle or setting called Practice Lock that gates access to the toolset.
What I'd suggest instead
If your goal is to have a constrained profiling environment where you can't accidentally add instruments that skew results, the practical workaround is to save a custom Instruments template with only the instruments you need. Go to File > Save Template, strip out everything unnecessary, and use that template whenever you want a clean, minimal setup. This is reliable and built right into the app. I hit a situation a while back where a colleague kept adding Allocation and Sandbox instruments to a latency-sensitive trace, and the timing data became completely unreliable. Saving a dedicated Performance-only template solved that problem immediately. No special software, no workaround scripts, just a saved template. If you meant something else by Instruments Practice Lock — maybe a different tool, a training module, or a feature from a specific version of Xcode I'm not aware of — tell me a bit more about where you saw the term and I can try to point you in the right direction.