Skip to main content

Running

A run configuration is a named way to run something in the open folder: a project with its arguments, a test suite, a Maven goal. Runesmith finds one for each runnable project when you open a folder, and the run widget in the toolbar runs, stops and builds the one you select. This page covers the run widget, the Run panel and the configurations dialog.

Run a configuration​

  1. Open a folder. After a moment, the run widget at the right of the toolbar shows the first configuration Runesmith found, such as ColorApp.
  2. To run another one, click the configuration's name and pick it from the list.
  3. Click the green Run button, or press ShiftF10.

Runesmith saves your changed files, runs the configuration's before-launch steps, then starts the program. The Run panel opens with a tab for the run, and the task indicator in the status bar shows Running until the program ends.

ButtonKeyWhat it does
ConfigurationThe selected configuration. Its list groups the configurations by kind, puts the ones you ran last first, and ends with Edit Configurations....
RunShiftF10Runs the selected configuration. With no configuration, it opens Edit Configurations.
DebugShiftF9Turned off: Runesmith has no debugger yet. Its tooltip says so.
StopCtrlF2Stops the selected configuration's run, or the last run that is still going.
BuildCtrlShiftBBuilds the selected configuration's project; see Building.

Running a configuration that runs already asks whether to stop it and run it again. The tooltip of each button shows its key.

The Run menu has the same commands: Run, Debug, Stop and Edit Configurations....

The Run panel​

The Run panel shows a tab per configuration you ran, with its icon and name. A green dot on a tab means it runs; a red dot means it ended with an error. Running a configuration again reuses its tab.

PartWhat it does
RerunRuns the configuration again, with its before-launch steps.
StopEnds the program and every process it started.
ClearEmpties the output.
StateRunning with the time so far, then the exit code and how long the run took, or Stopped.
OutputWhat the program writes, with its colors. Standard error shows in red, and Runesmith's own lines, such as the command line it ran, in grey.
Input lineText you type here and confirm with Enter goes to the program's standard input.

The output understands ANSI escape sequences: the 16 basic colors, bright colors, backgrounds and bold. .NET programs that set Console.ForegroundColor show their colors too, because Runesmith sets DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION and a TERM with colors for them.

Places in files show as links. Click one to open the file at that line:

Written asExample
Compiler messagesProgram.cs(12,5): error CS0103: ..., src/Main.java:7: error: ...
.NET stack framesat App.Program.Main() in /src/App/Program.cs:line 17
Java stack framesat com.example.Main.run(Main.java:42), found in the folder's sources by its package

Right-click the output for Copy Line, Copy All and Clear. The panel keeps the last 100,000 lines of a run.

Edit configurations​

Run › Edit Configurations..., or Edit Configurations... at the end of the run widget's list, opens the configurations dialog.

  1. Pick a configuration in the list on the left, which groups them by kind. The plus button adds a configuration of a kind you choose, the minus button removes the selected one, and the copy button duplicates it.
  2. Change its Name, where it is stored, and its settings on the right. Each kind has its own settings; C# support and Java support list them.
  3. Change its Before launch steps.
  4. Press OK to save, or Cancel to forget the changes.

OK stays turned off while the selected configuration has a problem, such as an empty name or a name another configuration has.

Shared and local configurations​

Store as decides where a configuration is saved:

ChoiceSaved inUse it for
Shared.runesmith/run.json in the folderConfigurations everyone working on the folder should have; commit the file.
LocalRunesmith's state folder, for this folder onlyConfigurations only you need, such as one with your own arguments.

Configurations that Runesmith found are found again each time you open the folder, and are not saved. When you change one in the dialog, it becomes a saved configuration with the same name, which takes the found one's place.

.runesmith/run.json lists each configuration's kind, name, settings and steps:

{
"configurations": [
{
"type": "dotnet.project",
"name": "ColorApp (Release)",
"values": {
"configuration": "Release",
"project": "ColorApp/ColorApp.csproj"
},
"beforeLaunch": [
{ "kind": "build" }
]
}
]
}

Before launch​

Before launch steps run in order before the program starts. A step that fails stops the launch, and the Run panel says which one.

StepWhat it does
BuildBuilds what the configuration runs, such as only its project. A kind that has no build of its own builds the whole folder, as Build › Build does. A new configuration starts with this step.
Run ConfigurationRuns another configuration in its own tab and waits for it to end; it fails when that run ends with an exit code other than 0.
CommandRuns a command line in the open folder, with sh -c or cmd /c; it fails when the command does.

The arrows move a step up or down, and the cross removes it.