Skip to content

Instantly share code, notes, and snippets.

@dsabanin
Last active November 7, 2022 16:17
Show Gist options
  • Save dsabanin/e1fe9bdc03d429d6cbcc7be13add9e6d to your computer and use it in GitHub Desktop.
Save dsabanin/e1fe9bdc03d429d6cbcc7be13add9e6d to your computer and use it in GitHub Desktop.
Enable internal Xcode debug menu in Xcode 11
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool YES
sudo mkdir -p /Applications/Xcode.app/Contents/Developer/AppleInternal/Library/Xcode
sudo touch /Applications/Xcode.app/Contents/Developer/AppleInternal/Library/Xcode/AppleInternal.plist
# Don't forget to restart Xcode
@dsabanin
Copy link
Author

Well, I learned about ShowDVTDebugMenu flag from some old blog posts, but it wasn't working anymore. I couldn't resist digging a bit through the Xcode frameworks with Hopper Disassembler.

I found the isAppleInternal flag that Xcode is using to determine whether to show this menu and some other things, and the flag is set to true if the Xcode.app/Contents/Developer/AppleInternal/Library/Xcode/AppleInternal.plist path is present.

🤷‍♂️

@Styrmist
Copy link

Do you have any info about enabling internal menu on simulator? Old method with folder didn't work.

@kinwahlai
Copy link

Thanks for sharing this. I just saw a video Paul Hudson yesterday about this AppleInternal.

by the way, the script doesn't work immediately because I have 2 different Xcode suffix with version number
This is what I changed to make it work.

XCODE=`xcode-select -p`
sudo mkdir -p $XCODE/AppleInternal/Library/Xcode
sudo touch $XCODE/AppleInternal/Library/Xcode/AppleInternal.plist

@flarn2006
Copy link

Not working in Xcode 13 (13F100), though "13F100" appears in the Dock icon when I run it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment