Skip to content

Instantly share code, notes, and snippets.

@dsabanin
Last active November 7, 2022 16:17
Show Gist options
  • Star 79 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • 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

Enables this internal menu in Xcode:

@KatkayApps
Copy link

Not working for me on Xcode 11.3.1...

@dsabanin
Copy link
Author

dsabanin commented Feb 22, 2020

Any errors when you run the commands?

@FromDerik
Copy link

FromDerik commented Feb 22, 2020

I believe it's an error with the path. It should be '/Applications/Xcode.app/Contents/Developer/...'

edit: this worked for me

@dsabanin
Copy link
Author

dsabanin commented Feb 22, 2020

Darn it, sorry I missed that. Thanks for catching it, @FromDerik.
Fixed the gist.

@KatkayApps
Copy link

KatkayApps commented Feb 22, 2020

working now. THANKS!
Just out of curiosity how did you discover this? 😃

@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