Skip to content

Build Settings

Mark Sarson edited this page Sep 27, 2026 · 2 revisions

Clarion Build Settings

This page describes the build and run settings of the Clarion Extension (current as of 1.0.6). The full list of settings is in the Settings Reference.

Overview

The Clarion Extension provides several configuration options that allow you to control how build output is displayed and managed. These settings give you more flexibility when debugging build issues or when you want more visibility into the build process.

Available Settings

Build Output Visibility

Controls when the build output terminal is shown during the build process.

"clarion.build.revealOutput": "never" | "always" | "onError"
  • never (default): The build terminal is never shown, keeping the UI clean.
  • always: The build terminal is always shown when a build starts.
  • onError: The build terminal is only shown when a build fails.

Log File Preservation

Controls whether the build output log file is preserved after the build completes.

"clarion.build.preserveLogFile": false | true
  • false (default): The log file is automatically deleted after the build completes and errors are processed.
  • true: The log file is preserved, allowing you to inspect it after the build.

Custom Log File Path

Specifies a custom path for the build output log file.

"clarion.build.logFilePath": ""
  • "" (default): The log file is created in the solution directory with the name "build_output.log".
  • Custom path: Specify a full path to use a different location or filename.

Output Panel Integration

Controls whether build output is also shown in the Output panel.

"clarion.build.showInOutputPanel": false | true
  • false (default): Build output is only processed for the Problems panel.
  • true: Build output is also shown in a dedicated "Clarion Build" channel in the Output panel.

Save Before Build

"clarion.saveBeforeBuild": true | false
  • true (default): All unsaved files are saved before any build, so the compiler always sees the latest content.
  • false: Build what is on disk.

Custom Run Command

What Run Without Debugging (Ctrl+F5) executes instead of the project's output exe.

"clarion.run.command": ""
  • "" (default): Run the startup project's output exe.
  • A command: Run it in a PowerShell terminal, from the project folder. ${exe} (the output exe), ${projectDir} and ${args} (the project's start arguments) are substituted, for example & "${projectDir}\CopyRun.bat". Each run replaces the previous Run terminal for the same program. Debug (F5) still starts the exe itself.

The Actions Panel

The Actions panel at the top of the Clarion Tools sidebar shows these settings and lets you change them without opening Settings:

  • Build log — whether the log is kept; click to open the last log, or to keep / stop keeping it (clarion.build.preserveLogFile)
  • Startup — the project Run and Debug start; click to choose another
  • Run — shown when clarion.run.command is set; click to edit it
  • Settings — opens the Clarion build settings

How to Configure

You can configure these settings in your VS Code settings.json file:

{
  "clarion.build.revealOutput": "onError",
  "clarion.build.preserveLogFile": true,
  "clarion.build.logFilePath": "C:\\BuildLogs\\clarion_build.log",
  "clarion.build.showInOutputPanel": true
}

Or use the VS Code Settings UI:

  1. Open VS Code Settings (File > Preferences > Settings or Ctrl+,)
  2. Search for "clarion.build"
  3. Adjust the settings as needed

Use Cases

Debugging Build Issues

When you're having trouble with builds failing:

{
  "clarion.build.revealOutput": "always",
  "clarion.build.preserveLogFile": true,
  "clarion.build.showInOutputPanel": true
}

This configuration shows you the build process in real-time, preserves the log file for inspection, and displays the output in both the Problems panel and Output panel.

Clean UI for Regular Development

For day-to-day development when builds are working well:

{
  "clarion.build.revealOutput": "never",
  "clarion.build.preserveLogFile": false,
  "clarion.build.showInOutputPanel": false
}

This is the default configuration, which keeps the UI clean and only shows errors in the Problems panel when they occur.

Conditional Terminal Display

If you want to see the terminal only when there are errors:

{
  "clarion.build.revealOutput": "onError",
  "clarion.build.preserveLogFile": false,
  "clarion.build.showInOutputPanel": false
}

This configuration keeps the UI clean during successful builds but shows the terminal when errors occur.

Troubleshooting

If you're not seeing any build output or errors:

  1. Set clarion.build.revealOutput to "always" to see the raw build output
  2. Set clarion.build.preserveLogFile to true to inspect the log file
  3. Errors and warnings are read from the build log into the Problems panel, on the file and line the compiler names (an error that names a file but no line lands on that file's first line). Clarion: Clear Build Results removes them; they are also cleared when another build task starts

If the build seems to succeed but you can't see any output:

  1. Set clarion.build.showInOutputPanel to true to see if output is being captured
  2. Check the Problems panel (View > Problems) for any errors or warnings