Smart Terminal

Smart Terminal is a special version of the terminal window, that is optimized for running various development-related commands. You can open it via View->VisualGDB Smart Terminal. It is also available as a part of CodeVROOM – our new cross-platform IDE, that is still early in development.

Smart Terminal is supported by all editions of VisualGDB.

Controls

Smart Terminal keeps a detailed track of each command you run with it, that allows it to provide various usability shortcuts, such as graphical environment editor, or favorite directory lists:Here is a list of the common controls:

  • Directory navigation buttons (1) provide history of visited directories. You can go back/forward or up one level. You can also hover over the components of the current path (bottom left corner) and click on them to go to that level.
  • Environment selector (2) allows switching between environment presets, or editing them in-place. Smart Terminal automatically picks up the build command environments (e.g. CMake build with ESP-IDF variables) for common project types, so you can use it to run modified versions of build commands.
  • Directory history (3) and command history drop-down (4) allow quickly re-running previously used commands. You can also mark commands/directories as favorite, pinning them on top of the list.
  • Document shortcuts (5) allow quickly going to the directory of the current document (you can always go back via the navigation buttons), or pasting relative path to it into the command line editor.
  • Aggressive completion mode button (6) controls how the suggestion popups are shown. In non-aggressive mode, the suggestions are only shown when you press TAB. In aggressive mode, they are always shown as you type the command, but only committed when you press TAB.
  • Clear Screen button (7) clears the terminal window, preserving all histories.
  • File List button (8) toggles the file list panel on the right side of the terminal.
  • Command line edit button (9) opens the command line editor in a separate window

Environment Presets

You can edit environment presets associated with a project via VisualGDB Project Properties-> Smart Terminal Environment, or by using the Edit Environment Presets link :Smart Terminal automatically picks up the common environments (e.g. CMake build environment) from common project types, and shows them in the environment selector.

Directory and Command History

Smart Terminal maintains separate directory and command history for every project. You can browse the history using the drop-down buttons on top of the window:Smart Terminal automatically pulls common directories and commands (e.g. main build directory) from common project types. If the project is targeting a remote machine, the directory list will show both remote and local directories.

Suggestion Popups

Smart Terminal knows the precise context of the command you are entering, so it can provide meaningful suggestions (e.g. search all PATH directories for executables). Normally, suggestions are shown when you press TAB, but you can also activate the aggressive suggestion mode in the toolbar, that will show them as soon as you type a character:

Integrated File List

You can quickly view the files in the current directory by enabling the file list panel:Double-clicking on directories in the list will automatically go to that directory. Double-clicking on a file will copy it into the command line. You can also use the context menu to open files in the editor, or copy them to the command line.

You can use Alt+<File Name> to filter the files in the panel when editing the command line, or browsing the file list. Pressing Escape will return back to the command line editor, so you can use it for fast navigation between directories.

Command Line Editor

Many development tools use rather long command lines, that are hard to edit in a regular terminal. Smart Terminal addresses it via a separate Edit Command Line button:It shows the entire command line in a separate window, with every argument on a separate line.

Viewing Command Results

Smart Terminal displays the run time and exit code of every command it runs:You can use the drop-down button at the end of the summary line to view the command output in a separate editor tab, copy the original command line back into the command editor, or add the command to the favorite command list.