Run Configurations
How to run BoxLang scripts in IntelliJ IDEA — run configurations, gutter icons, program arguments, environment variables, and attach configurations.
The BoxLang IntelliJ plugin provides two types of run configurations: BoxLang for executing scripts directly, and BoxLang Attach for connecting to running BoxLang processes.
BoxLang Run Configuration
Execute BoxLang scripts directly from the IDE with full control over the execution environment.
Creating a Run Configuration
Method 1: From Gutter Icon
Open a BoxLang file (
.bx,.bxs,.cfc,.cfm)Click the green play icon ▶️ in the gutter next to the file or main method
Select Run 'filename'
Method 2: From Run Menu
Select Run → Edit Configurations...
Click the + button and select BoxLang
Configure the settings (see below)
Click OK
Method 3: From Context Menu
Right-click a BoxLang file in the Project view
Select Run 'filename'
Configuration Options
Name
Display name for the run configuration
Script Path
Path to the BoxLang script to execute. Use $FilePath$ macro for current file
Working Directory
Directory where the script runs. Defaults to project root
Program Arguments
Command-line arguments passed to the script
Environment Variables
Environment variables set before execution (format: KEY=value)
JVM Arguments
Additional JVM arguments (e.g., -Xmx512m)
Example: Run Current File
Example: Run with Arguments
BoxLang Attach Configuration
Connect the debugger to an already-running BoxLang process via JDWP (Java Debug Wire Protocol).
Creating an Attach Configuration
Select Run → Edit Configurations...
Click the + button and select BoxLang Attach
Configure the settings (see below)
Click OK
Configuration Options
Name
Display name for the attach configuration
Host
Hostname or IP address of the running BoxLang process (default: localhost)
JDWP Port
Debug port the BoxLang process is listening on (default: 5005)
Local Root
Local project root path for source mapping
Remote Root
Remote project root path (for remote debugging scenarios)
Starting a BoxLang Process with Debug Enabled
Before attaching, start your BoxLang process with JDWP enabled:
Or use the BoxLang CLI:
Path Mapping for Remote Debugging
When debugging a BoxLang process running on a different machine or in a container:
The debugger maps source file paths between local and remote locations.
Run Line Markers
The plugin adds gutter icons for quick execution:
▶️
Next to file name
Run the entire file
▶️
Next to main() method
Run the main method
🐛
Next to file/method
Debug the file or method
Click the icon to run or debug immediately. Right-click for additional options.
Running from Terminal
You can also run BoxLang scripts from the integrated terminal:
Related Pages
Last updated
Was this helpful?