aboutsummaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-08-16 15:09:04 +0200
committerLiang Qi <liang.qi@qt.io>2017-08-24 04:49:06 +0000
commitdfaabde5dcbdecf24d24dce4172c976687085bb6 (patch)
tree8c8154db5db1daae9a42d2504536a231774f0851 /coin
parentf1b1f3dc097defe3c7cb9a571598583376eddf5f (diff)
Enable developer mode on macOS platforms
Previously when a VM user tried to attach lldb to a process via ssh, lldb would fail with the following error message: "error: process exited with status -1 (unable to attach)". If this were done over VNC rather than ssh, the user would instead get a UI popup to enter a password to allow debugging the process. When trying to debug an application using Xcode for the first time, Xcode will offer to enable the so called "Developer Mode" which allows attaching a debugger without specifying a password every time. This change enables "Developer Mode", so that every VM user doesn't have to. Change-Id: Ie4e473a982c908afd456ac1773bbdaf4ce778094 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'coin')
-rwxr-xr-xcoin/provisioning/common/install_xcode.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/coin/provisioning/common/install_xcode.sh b/coin/provisioning/common/install_xcode.sh
index 82c05a45..c6f00ee7 100755
--- a/coin/provisioning/common/install_xcode.sh
+++ b/coin/provisioning/common/install_xcode.sh
@@ -51,6 +51,7 @@ function InstallXCode()
{
ExceptionCPIO=103
ExceptionAcceptLicense=105
+ ExceptionDeveloperMode=113
sourceFile=$1
version=$2
@@ -63,6 +64,9 @@ function InstallXCode()
echo "Accept license"
sudo xcodebuild -license accept || throw $ExceptionAcceptLicense
+ echo "Enabling developer mode, so that using lldb does not require interactive password entry"
+ sudo /usr/sbin/DevToolsSecurity -enable || throw $ExceptionDeveloperMode
+
echo "Xcode = $version" >> ~/versions.txt
)
catch || {
@@ -71,6 +75,10 @@ function InstallXCode()
echo "Failed to unarchive .cpio."
exit 1;
;;
+ $ExceptionDeveloperMode)
+ echo "Failed to enable developer mode."
+ exit 1;
+ ;;
$ExceptionAcceptLicense)
echo "Failed to accept license."
exit 1;