AppCode 2022.3 Help

External tools

Configure third-party command-line applications as external tools to run them from AppCode. For example, your workflow may require running a specific script, code generator, analyzer, preprocessor or postprocessor, some database utility, and so on. By configuring it as an external tool, AppCode provides a dedicated action for it, which you can run from the main menu, from certain context menus, assign a shortcut to it, or run it when launching a specific run configuration.

You can use built-in IDE macros to pass context-dependent command-line arguments to the tool, such as the current file or your project source path. If necessary, AppCode will print the tool's output to the console.

AppCode supports the following types of external tools:

  • Local tools run locally on your computer.

  • Remote tools are executed on a remote server over SSH.

Add a local external tool

This example demonstrates how to add Emacs as an external tool and use it to open and edit files in your project.

  1. Press ⌃ ⌥ S to open the IDE settings and select Tools | External Tools.

  2. Click the Add button and specify the tool's settings.

    The Create Tool dialog

    For more information, see External Tools.

  3. Click OK to add the tool and then apply the changes.

Run the added local external tool

To open the selected file in the newly added Emacs tool, do one of the following:

  • From the main menu, select Tools | External Tools | Emacs.

  • Right-click a file in the Project tool window and select External Tools | Emacs from the context menu.

  • Create a shortcut to run the tool.

    Press ⌃ ⌥ S to open the IDE settings and select Keymap. Find the Emacs action under the External Tools node, and assign a shortcut for it.

When you run the tool, the selected file opens in a separate window.

Running External Tool

Run the added tool on a remote server

  • From the main menu, select Tools | Remote tools | Date and time.

  • In the Preferences dialog (⌃ ⌥ S), select Keymap, find the Date and time action, and assign a shortcut for it. Use the shortcut to run the tool.

After you specify the host, port, and credentials, AppCode will connect to the server via SSH and run the date command, returning the output to the Run tool window in AppCode.

Web browsers

You can use a web browser to open any file from your project. By default, it is used to preview the output of an HTML file or run and debug web applications.

Open a file in a web browser

To open a file that is intended to be rendered by a web browser (HTML, XML, JSP, and so on), do one of the following:

  • Press ⌥ F2.

  • Right-click a file and select Open in Browser.

  • From the main menu, select View | Open in Browser.

  • Use the browser popup in the top right part of the editor window. Click the browser button to open the web server file URL, or Shift+Click it to open the local file URL.

    Show in browser

The Open in Browser action is not available for other file types. However, you can still execute it using Find Action ⌃ ⇧ A.

View and configure the list of browsers

  • In the Preferences dialog (⌃ ⌥ S), select Tools | Web Browsers and Preview.

The Web Browsers page in Preferences

If a browser was installed using a standard procedure, the alias in the Path field should point to the right location. If it does not, specify the path to the corresponding executable file.

Use custom profile and settings

You can configure custom profiles for Firefox and Chrome family browsers.

  1. In the Preferences dialog (⌃ ⌥ S), select Tools | Web Browsers and Preview.

  2. Select the browser in the list and click the Edit button.

    • For Firefox, specify the path to the profiles.ini file and choose the profile to use. For more information, see Firefox browser profile.

    • For Chrome, select Use custom user data directory and specify the location of the user data directory.

      You can also specify additional command-line options to use when running Chrome from AppCode. For more information, open chrome://flags in the Chrome address bar.

Last modified: 14 December 2022