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
- Open a folder. After a moment, the run widget at the right of the toolbar shows the first configuration Runesmith found, such as
ColorApp. - To run another one, click the configuration's name and pick it from the list.
- 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.
| Button | Key | What it does |
|---|---|---|
| Configuration | The selected configuration. Its list groups the configurations by kind, puts the ones you ran last first, and ends with Edit Configurations.... | |
| Run | ShiftF10 | Runs the selected configuration. With no configuration, it opens Edit Configurations. |
| Debug | ShiftF9 | Turned off: Runesmith has no debugger yet. Its tooltip says so. |
| Stop | CtrlF2 | Stops the selected configuration's run, or the last run that is still going. |
| Build | CtrlShiftB | Builds 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.
| Part | What it does |
|---|---|
| Rerun | Runs the configuration again, with its before-launch steps. |
| Stop | Ends the program and every process it started. |
| Clear | Empties the output. |
| State | Running with the time so far, then the exit code and how long the run took, or Stopped. |
| Output | What 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 line | Text 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 as | Example |
|---|---|
| Compiler messages | Program.cs(12,5): error CS0103: ..., src/Main.java:7: error: ... |
| .NET stack frames | at App.Program.Main() in /src/App/Program.cs:line 17 |
| Java stack frames | at 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.
- 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.
- 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.
- Change its Before launch steps.
- 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:
| Choice | Saved in | Use it for |
|---|---|---|
| Shared | .runesmith/run.json in the folder | Configurations everyone working on the folder should have; commit the file. |
| Local | Runesmith's state folder, for this folder only | Configurations 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.
| Step | What it does |
|---|---|
| Build | Builds 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 Configuration | Runs 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. |
| Command | Runs 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.