Working with Clarion solutions, projects, and build configurations in VS Code.
The Clarion Extension provides native solution management:
- Automatic solution detection - Just open a folder
- Solution Explorer - Navigate projects and files
- Recent solutions - Quick access to your last 20 solutions
- Build integration - Generate applications from VS Code
- No workspace files needed - Settings stored with solution
Simple two-step process:
- File → Open Folder (or press
Ctrl+K Ctrl+O) - Browse to folder containing your
.slnfile - Click Select Folder
Then in Clarion Tools sidebar:
- Extension scans and shows "X Solution(s) Found"
- Click the ▶ solution name to open it
- First-time: Configure Clarion path and settings (see Configuration section)
Why this works:
- Extension automatically scans folder for
.slnfiles - Shows all detected solutions in Clarion Tools sidebar
- Click to open and configure
If .sln file is elsewhere:
- Open Clarion Tools icon in Activity Bar (left sidebar)
- In Solution View, click "📂 Browse for Solution..."
- Navigate to your
.slnfile - Click Open
The containing folder opens automatically, and the solution is loaded.
Quick access to previously opened solutions:
- Open Clarion Tools sidebar
- In Solution View, expand "Recent Solutions"
- Click any solution name
Features:
- Remembers last 20 solutions
- Shows last opened timestamp
- Automatically validates (removes invalid paths)
- Global list (works across all folders)
Clarion Tools
├── Solution View
│ ├── MySolution.sln
│ │ ├── MyApplication.cwproj
│ │ │ ├── MyApp.app
│ │ │ ├── MyApp.clw
│ │ │ └── includes/
│ │ │ └── MyFile.inc
│ │ └── MyLibrary.cwproj
│ │ └── MyLib.clw
│ └── Recent Solutions
│ ├── ProjectA (Last opened: 2026-01-08)
│ └── ProjectB (Last opened: 2026-01-05)
Click to open files:
- Single-click: Selects file
- Double-click: Opens file in editor
Projects sorted by build order: Projects in the Solution View are ordered dependency-first (libraries before the applications that depend on them), matching the actual build order.
Context menu (right-click):
- Generate Application - Build selected app
- Open in Explorer - Show file in Windows Explorer
- Copy Path - Copy full file path
Expand/collapse:
- Click arrows to expand/collapse projects
- Shows hierarchical structure
When opening a solution for the first time, you'll configure:
What: Path to Clarion BIN directory
Used for: Building with ClarionCl.exe
Example: C:\Clarion11\Bin
Set manually:
Ctrl+Shift+P→ "Clarion: Set Clarion Path"
What: .clarion.properties file for redirection
Used for: Finding included files
Can be:
- Project-specific:
C:\MyProject\.clarion.properties - Global:
C:\Clarion11\.clarion.properties
Set manually:
Ctrl+Shift+P→ "Clarion: Set Clarion Properties"
What: Debug or Release build
Default: Release|Win32
The active build configuration is now auto-detected from the .sln.cache file when the solution is opened — it no longer defaults to the first config in the list.
Change anytime:
- Click configuration in status bar (bottom)
- Or:
Ctrl+Shift+P→ "Clarion: Set Configuration"
All settings saved in .vscode/settings.json within solution folder:
{
"clarion.clarionPath": "C:\\Clarion11\\Bin",
"clarion.propertiesPath": "C:\\MyProject\\.clarion.properties",
"clarion.configuration": "Release|Win32"
}Benefits:
- Persists when reopening solution
- Can be committed to version control
- Team members share same configuration
- In Clarion Tools sidebar, find your application
- Right-click on the
.appfile - Click "Generate Application"
- Build output appears in terminal
- Make sure a
.appfile is open or selected - Press Ctrl+Shift+B
- Build starts automatically
- Press
Ctrl+Shift+P - Type "Clarion: Generate Application"
- Select your application (if multiple)
Live output in integrated terminal:
- Compilation progress
- Error messages (in red)
- Warnings (in yellow)
- Success message
Click errors to jump to source:
- Error messages show file and line number
- Click to open file at error location
Available configurations:
- Debug|Win32 - Debug build, 32-bit
- Release|Win32 - Release build, 32-bit
- Debug|x64 - Debug build, 64-bit
- Release|x64 - Release build, 64-bit
Switch configuration:
- Click current config in status bar (e.g., "Release|Win32")
- Select new configuration from dropdown
Or:
Ctrl+Shift+P→ "Clarion: Set Configuration"- Select configuration
Fix:
Ctrl+Shift+P→ "Clarion: Set Clarion Path"- Browse to Clarion BIN folder
- Try building again
Fix:
- Make sure folder contains
.slnfile - Reopen folder: File → Open Folder
- Check Clarion Tools sidebar shows solution
Check:
- Terminal output for specific error messages
- File paths are correct
- Redirection files configured properly
- All include files are accessible
Clarion uses .clarion.properties files to map logical paths to physical paths.
Example:
# Redirections
%CW% = C:\Clarion11
%INCLUDE% = %CW%\Accessory\LibsrcLocation: Clarion installation folder
Example: C:\Clarion11\.clarion.properties
Used for: System-wide paths like %CW%
Location: Project folder
Example: C:\MyProject\.clarion.properties
Used for: Project-specific paths
Set properties file path:
Ctrl+Shift+P→ "Clarion: Set Clarion Properties"- Browse to
.clarion.propertiesfile - Saved in
.vscode/settings.json
Manual configuration:
{
"clarion.propertiesPath": "C:\\MyProject\\.clarion.properties"
}VS Code limitation: Only one folder open at a time
Workflow:
- Open first solution folder
- Work on it
- File → Open Folder to open second solution
- First solution closes automatically
Tip: Use Recent Solutions list to quickly switch between solutions.
Access via Ctrl+Shift+P:
- Clarion: Set Clarion Path - Configure Clarion installation
- Clarion: Set Clarion Properties - Configure properties file
- Clarion: Set Configuration - Change Debug/Release
- Clarion: Generate Application - Build application
- Clarion: Show Extension Status - Health check
- Clarion: Refresh Solution - Reload solution tree
Bottom-right status bar shows:
-
Clarion Version - e.g., "Clarion 11"
- Click to change Clarion path
-
Build Configuration - e.g., "Release|Win32"
- Click to change configuration
-
Current Document - File name and language mode
- Keep Clarion Tools sidebar visible
- Use Recent Solutions list for one-click access
- Pin frequently-used solutions to File menu
MySolution/
├── .vscode/
│ └── settings.json ← Solution-specific settings
├── .clarion.properties ← Local redirections
├── MySolution.sln
├── MyApp.app
└── MyApp.clw
- Commit
.vscode/settings.jsonto version control - Use relative paths where possible
- Document redirection setup in README
- Build output uses dedicated terminal
- Terminal reused for subsequent builds
- Multiple terminals don't stack up
- Installation Guide - Initial setup
- Common Tasks - Building recipes
- Settings Reference - All configuration options