Debug as root
In AppCode, you can run and debug applications with root privileges.
The Run with root privileges option is available for the Application run/debug configuration for the macOS targets only.
When this checkbox is selected, the configuration is launched with root privileges for running or debugging.
Configure authorization time
If do not want to authorize each time you run or debug an application with elevated privileges, you can configure the amount of time the authorization is kept. This is similar to how the sudo
command-line program works by default.
When you run or debug with elevated privileges for the first time, you will be prompted to choose whether to authorize every time or grant authorization for the configured period. You will always be able to change this in the settings.
Note that AppCode will not have access to any passwords - the authorization is carried out via a system dialog. After the configured time runs out, the already running processes with root privileges will continue to run, but no new elevated process will be able to start until you authorize that again.
Set the authorization period in the settings
You can also configure the time the authorization is kept in the settings.
Go to
.Set the Keep 'sudo' authorization for checkbox and specify the value. The default is 15 minutes.