Run configurations
此内容尚不支持你的语言。
A run configuration is a command line with its folder, environment, test report and the steps to
run before it. Ferris IDEA suggests configurations from your build files, and keeps the ones you
write in .ferris-idea/run.toml in the project, where you can commit them. Run configurations are
Works; Run Anything is Experimental.
Run something right away
Section titled “Run something right away”- Run › Run Current File (⌃⇧R) runs what fits the caret: a
main, a script, a test function or a whole test file. The language pages list the commands per language, for example Rust. - The ▶ in the gutter does the same for one line.
- Run › Run… (⌃⌥R) opens the list of configurations.
Each start opens a tab in the Run tool window (⌘4). The first line is the command line, error output is shown in the error colour, and the run ends with “Process finished with exit code n”. Modified files are saved before every start.
Choose a configuration
Section titled “Choose a configuration”Run › Run… and Run › Debug… (⌃⌥D) open the same list, also reachable from the run widget at the top of the window:
| Heading | What it holds |
|---|---|
| Pinned | the configurations you pinned |
| Run Configurations | the ones in run.toml, grouped by their folder |
| Temporary | the last five things you ran without saving them |
| Detected from build files | the suggestions from Cargo, npm, Go, Maven, Gradle and pytest |
Type to filter; 1 to 9 pick a row and 0 opens Edit Configurations…. Hold ⇧ to debug instead of run. The ⋮ menu of a row offers Edit…, Delete, Pin, Save Configuration for a temporary one and Copy to run.toml for a detected one.
Create or edit a configuration
Section titled “Create or edit a configuration”-
Run › Edit Configurations…. The dialog “Run/Debug Configurations” opens.
-
Add (⌘N) and choose a type: Command, Shell script, Node.js file, npm script, Python file, Cargo, Maven, Gradle, Go test or pytest.
-
Fill in the form:
Field Meaning Name unique in the project Command line one line, quoted as in a shell; nothing is expanded except ${workspace}and${env:NAME}Working directory inside the project; empty means the project folder Environment one NAME=valueper lineKind Run, or Test to read a report into the result tree Report format and file for tests: junit,libtest,tap,jest(also Vitest) orgotestTimeout seconds until the run is stopped; 600 unless you change it Folder a group in the run list Instances One at a time, or Allow multiple instances -
Under Before launch, add configurations to run first, and tasks: Build, Run external tool… or Open browser….
-
Apply writes
run.tomland keeps its comments; Run and Debug start it at once.
Problems show under the field they belong to while you type. Edit templates per type… sets the defaults a new configuration of that type starts with, including the interpreter for Python and Node.js. In a project you have not trusted the dialog only shows.
What run.toml looks like
Section titled “What run.toml looks like”[[run]]name = "tides"command = ["python3", "tidepool/tides.py", "--days", "7"]env = { TIDE_STATION = "harbour" }before = ["fetch readings"]
[[run]]name = "fetch readings"command = ["sh", "scripts/fetch.sh"]timeout = 120A configuration from IntelliJ IDEA’s project files (.idea/runConfigurations, workspace.xml,
.ipr) of the types Application, JUnit, Gradle, Maven, Python, Shell Script and HTTP request is
listed and run as it is; it is read only, and one in run.toml with the same name hides it.
Before-launch tasks
Section titled “Before-launch tasks”The order is: the configurations named under Before launch, then Build (Maven, Gradle,
Cargo, Go or the package’s build script), then external tools. Open browser… opens an
http(s) address or a project .html file once the program has started, and can wait up to 60
seconds for a local port. When a step fails, the chain stops with “Run stopped: step failed”.
Rerun and stop
Section titled “Rerun and stop”- In the Run tool window: Rerun (⌘R) and Stop (⌘F2). Stop ends the whole process group, first politely, after three seconds by force.
- Starting a configuration that is still running asks Stop and Rerun or Cancel, unless it allows multiple instances; then the new run gets its own tab, “name (2)”.
- Send EOF (⌘D in the Run tool window) closes the program’s input.
- The ⋮ menu of the Run tool window has Copy Command Line and Open Run Configuration.
The Run console keeps the last 10,000 lines. It does not turn file names in the output into links and shows no ANSI colours; the debug console does follow Java and Python stack traces.
Run Anything
Section titled “Run Anything”Press ⌃ twice. Type a command line and press ↩: it runs in the project folder as a temporary configuration. The list also offers your run configurations and the last 20 commands. The command is split as a shell would split it, but nothing is expanded; use a Shell script configuration for pipes and variables. In a remote project Run Anything runs typed commands on this machine only, so it refuses them there; use the Terminal tool window.
What is not there
Section titled “What is not there”- No compound configurations that start several at once.
- No coverage run; see Run tests.
Shortcuts
Section titled “Shortcuts”| Action | Shortcut |
|---|---|
| RerunRerun | ⌘RCtrlF5 |
| Run | ⌘4Alt4 |
| Run › Debug | ⌃⌥DAltShiftF9 |
| Run › Debug | ⌃DShiftF9 |
| Run › Debug Current File | ⌃⇧Dno shortcut |
| Run › Run | ⌃⌥RAltShiftF10 |
| Run › Run | ⌃RShiftF10 |
| Run › Run Current File | ⌃⇧RCtrlShiftF10 |
| Run › Stop | ⌘F2CtrlF2 |
| Run anythingRunAnything | ⌃then⌃CtrlthenCtrl |
| Send eofSendEOF | ⌘DCtrlD |
For agents
Section titled “For agents”Listing needs no right. Running needs the right run and a trusted project; editing run.toml
also needs write. Each tool does a dry run unless the agent asks otherwise, and every real run is
written to the agent log. You grant rights per workspace.
build_projectBuild Project in one call: the window's Build Project chain (Before Build tasks, cargo, Maven, Gradle and Go builds, After Build tasks), stopping at the first failure.project_modelProject model read from the build files in the workspace (Cargo, npm, Python, Maven, Go; Gradle detected): modules with name, version, folder, toolchain, dependencies with scope, tasks and members; problems per build file; suggested run configurations (Python ones with the workspace's selected interpreter,${workspace}/…inside the workspace).run_commandRun one program with arguments in the workspace (no shell).run_configurationRun a configuration from.ferris-idea/run.toml, or a reference IDE configuration that idea_project lists (untranslated ones are refused with the reason), after its before-launch chain.run_configuration_editChange the run configurations of.ferris-idea/run.tomlwith the Edit Configurations dialog's validation.run_configurationsRun configurations of.ferris-idea/run.toml(configs) with their validation problems, plusfolders,types(what Add offers),templatesandtemplate_problems.run_markersThe run markers (gutter ▶) of a file with 1-based line and the run configuration each starts: Java/Kotlinmainand JUnit tests (single method via Maven or Gradle), Vitest/Jestdescribe/it/test, pytest, Go and Rust tests, and themainof Go programs, Rust binaries and examples, and Python scripts (kindmain).run_outputThe Run tool window of the running Ferris IDEA window, read only: its tabs (name, running, exit code of the last run, number of failed tests); withtab(configuration name) also its console text and failed tests (name, message, details), masked (secrets as ‹masked›, count inmasked) and cut to the attachment budget keeping head and tail.
No tool matches. Try fewer words, or .