Для команды open отсутствует отладочный или подробный флаг.
Вы можете просмотреть вывод предупреждений или ошибок вашего приложения с помощью console.app
.
В качестве альтернативы, если ваше приложение имеет флаги отладки или многословия, вы можете передать этот флаг своему приложению, используя open --args
. Например, в Google Chrome есть флаги --enable-logging --v=1
чтобы включить отладку и сохранить вывод в chrome_debug.log
в каталоге пользовательских данных Chrome. Вы можете запустить Google Chrome со следующими параметрами
open -a "Google Chrome" --args --enable-logging --v=1
Опции для open
команды
-a application
Specifies the application to use for opening the file
-b bundle_indentifier
Specifies the bundle identifier for the application to use when open-
ing the file
-e Causes the file to be opened with /Applications/TextEdit
-t Causes the file to be opened with the default text editor, as deter-
mined via LaunchServices
-f Reads input from standard input and opens the results in the default
text editor. End input by sending EOF character (type Control-D).
Also useful for piping output to open and having it open in the
default text editor.
-F Opens the application "fresh," that is, without restoring windows.
Saved persistent state is lost, except for Untitled documents.
-W Causes open to wait until the applications it opens (or that were
already open) have exited. Use with the -n flag to allow open to
function as an appropriate app for the $EDITOR environment variable.
-R Reveals the file(s) in the Finder instead of opening them.
-n Open a new instance of the application(s) even if one is already run-
ning.
-g Do not bring the application to the foreground.
-j Launches the app hidden.
-h Searches header locations for a header whose name matches the given
string and then opens it. Pass a full header name (such as NSView.h)
for increased performance.
-s For -h, partial or full SDK name to use; if supplied, only SDKs whose
names contain the argument value are searched. Otherwise the highest
versioned SDK in each platform is used.
--args
All remaining arguments are passed to the opened application in the
argv parameter to main(). These arguments are not opened or inter-
preted by the open tool.