FICO® Xpress Mosel Extension (BETA)
This VS Code extension supports modelling and optimization with FICO® Xpress Mosel. The extension provides Mosel language support and Mosel runtime.
For a general-purpose guide to Mosel development, refer to the Xpress Mosel Guide.
License
The VS Code FICO® Xpress Mosel extension relies on FICO® Xpress software, which is subject to the Xpress Shrinkwrap License Agreement.
By downloading this extension, you agree to the Community License terms of the Xpress Shrinkwrap License Agreement with respect to the required FICO Xpress software.
See the licensing options overview for additional details and information about obtaining a paid license for FICO Xpress Solver.
The extension also contains other, separate, distinct software which may be subject to other licenses.
Start here
A more detailed README can be found here
Setup
This extension requires a valid installation of the FICO Xpress Solver.
If missing, here's how to install it: Xpress Solver Installation Documentation.
Features
Language Support Features
Standard Language Support Features
- Syntax highlighting
- Code folding
- Jump to definition
- Supported: variables/functions/uses/imports/includes
- Hover tooltip information
- Mosel documentation and declarations
- Code formatter
- Code completion
- Mosel documentation
- Local declaration
- Code diagnostic
- Errors feedback from the Mosel parser
- Symbols list
- Outline list ('Explorer' panel)
- Lookup list ('Go to Symbol in Editor')
Language Configuration Settings
- Tabulations or Spaces at the project level
- Indentation size at the project level
Languages settings:
- Allow a list of external Mosel source folder path (relative and/or absolute)
- This extend the support of the Language server to those folders:
- Hover tooltip
- Code completion
- Jump to definition
Runtime Features
Run the selected Mosel file
- Available from the top-right play button (visible on open Mosel files)
- Available as a configurable task in the
.vscode/tasks.json file
- Available at:
"Top Menu" -> "Terminal" -> "Run Build Task" -> "fico-xpress-mosel-run-file"
Build a bim file from the selected Mosel file
- Available as a configurable task in the
.vscode/tasks.json file
- Available at:
"Top Menu" -> "Terminal" -> "Run Build Task" -> "fico-xpress-mosel-compile-file"
Debug the selected Mosel file
- Conditional breakpoint supported
- Evaluation supported
- Variable inspector panel supported:
- Will not refresh when stepping over instructions
- Inside the Debug Console, type "show [expression]"
- Available from the top-right play button (visible on open Mosel files)
- Available as a configurable task in the
.vscode/tasks.json file
- Available at:
"Top Menu" -> "Terminal" -> "Run Build Task" -> "fico-xpress-mosel-debug-file"
How To Use
Supported Settings Example
// .vscode/settings.json
{
"fico-xpress-mosel-language-support-settings.indexer-resolved-folders": [
// will accept relative paths
// -> relative to the current workspace
"./mosel-source-scs/",
// will also accept abolute paths
// "/Users/my-machine-username/dev/mosel-source-scs/"
],
"fico-xpress-mosel-language-support-settings.code-format-options": {
// will override the default per-document value if present
"insertSpaces": true,
// will override the default per-document value if present
"tabSize": 2
}
}
Task Example: "Debug Mosel File"
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
...
{
// [REQUIRED] task public label, must be unique per task
"label": "fico-xpress-mosel-debug-file: Debug Test Mosel File",
// [REQUIRED] task type, constant
"type": "fico-xpress-mosel-debug-file",
// [REQUIRED] task name, constant
"task": "debug-file",
// [REQUIRED] the path to the file to run
"inputFile": "my-source-folder/test.mos",
// optional fields:
// [OPTIONAL] if omitted -> reuse the same folder of the Mosel source file
"outDir": "my-source-folder",
// [OPTIONAL] parameters to give to the execution
"parameters": {
// [OPTIONAL] example of numerical/boolean/string values
"NBRofWORKER": 8,
"ONE_BT_PER_WRKR": false,
"OUTPUT_SUBFOLDER": "output",
},
// [OPTIONAL] if omitted -> is false (for the "Debug Mosel File" only)
"stopOnEntry": true,
// [OPTIONAL] if omitted -> pick the XPRESSDIR environment value
"xpressmpPath": "my-xpressmp-folder",
},
...
]
}
Task Example: "Run Mosel File"
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
...
{
// [REQUIRED] task public label, must be unique per task
"label": "fico-xpress-mosel-run-file: Run Test Mosel File",
// [REQUIRED] task type, constant
"type": "fico-xpress-mosel-run-file",
// [REQUIRED] task name, constant
"task": "run-file",
// [REQUIRED] the path to the file to run
"inputFile": "my-source-folder/test.mos",
// optional fields:
// [OPTIONAL] if omitted -> reuse the same folder of the Mosel source file
"outDir": "my-source-folder",
// [OPTIONAL] parameters to give to the execution
"parameters": {
// [OPTIONAL] example of numerical/boolean/string values
"NBRofWORKER": 8,
"ONE_BT_PER_WRKR": false,
"OUTPUT_SUBFOLDER": "output",
},
// [OPTIONAL] if omitted -> pick the XPRESSDIR environment value
"xpressmpPath": "my-xpressmp-folder",
},
...
]
}
Task Example: "Compile Mosel File"
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
...
{
// [REQUIRED] task public label, must be unique per task
"label": "my-mosel-runner-task: Compile Test Mosel File",
// [REQUIRED] task type, constant
"type": "fico-xpress-mosel-compile-file",
// [REQUIRED] task name, constant
"task": "compile-file",
// [REQUIRED] the path to the file to compile
"inputFile": "my-source-folder/test.mos",
// optional fields:
// [OPTIONAL] if omitted -> reuse the same folder of the Mosel source file
"outDir": "my-source-folder",
// [OPTIONAL] if omitted -> pick the XPRESSDIR environment value
"xpressmpPath": "my-xpressmp-folder",
}
...
]
}
How to run a custom task
- Open the command palette:
- Windows:
Control + Shift + P
- Linux:
Control + Shift + P
- MacOS:
Command + Shift + P
- Select the option
Tasks: Run Task
- Become visible if you start typing
run task (autocomplete)
- (At this point you normally get a list of tasks)
- Select your task to run it
- Ex:
my-mosel-runner-task: Debug Test Mosel File
- If not listed, start typing
my-mosel-runner (autocomplete)
- Any extra question asked by vscode can be ignore (press
Enter)
- This should start the task
Support
Please use this link: Ask-a-question
©2026 Fair Isaac Corporation.
FICO is a registered trademark of Fair Isaac Corporation in the United States and may be a registered trademark of Fair Isaac Corporation in other countries. Other product and company names herein may be trademarks of their respective owners.
Patent(s): www.fico.com/en/patents