Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

@dsabanin dsabanin commented Feb 22, 2020

Enables this internal menu in Xcode:

@KatkayApps

This comment has been minimized.

Copy link

@KatkayApps KatkayApps commented Feb 22, 2020

Not working for me on Xcode 11.3.1...

@dsabanin

This comment has been minimized.

Copy link
Owner Author

@dsabanin dsabanin commented Feb 22, 2020

Any errors when you run the commands?

@FromDerik

This comment has been minimized.

Copy link

@FromDerik 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

This comment has been minimized.

Copy link
Owner Author

@dsabanin dsabanin commented Feb 22, 2020

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

@KatkayApps

This comment has been minimized.

Copy link

@KatkayApps KatkayApps commented Feb 22, 2020

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

@dsabanin

This comment has been minimized.

Copy link
Owner Author

@dsabanin dsabanin commented Feb 22, 2020

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

This comment has been minimized.

Copy link

@Styrmist Styrmist commented Feb 23, 2020

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

@kinwahlai

This comment has been minimized.

Copy link

@kinwahlai kinwahlai commented Jul 20, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment