There is an issue with the configuration. Whenever I run the scilab script then new Scilab windows pop up but old open up is not executed. How to stop it?
How to work with vs code ? Any tutorial for scilab?
`{
"version": "2.0.0",
"tasks": [
{
"label": "Run Scilab Script",
"type": "shell",
"command": "\"C:\\Program Files\\scilab-2024.0.0\\bin\\scilab-cli.exe\"",
"args": [
"-f",
"${workspaceFolder}\\spacecraft-gnc-tbx-devel-kalman-filter-block\\builder.sce"
],
"options": {
"cwd": "${workspaceFolder}\\spacecraft-gnc-tbx-devel-kalman-filter-block"
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"detail": "Run Scilab script using scilab-cli.exe"
},
{
"label": "New Task",
"type": "shell",
"command": "echo 'Hello, World!'",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "New Task",
"type": "shell",
"command": "echo 'Hello, World!'",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}`
Hello,
You have to add “-quit” to “args”.
Best regards.
Can you please tell me at which positions``?
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Scilab Script",
"type": "shell",
"command": "\"C:\\Program Files\\scilab-2024.0.0\bin\\scilab-cli.exe\"",
"args": [
"-f",
"${workspaceFolder}\\spacecraft-gnc-tbx-devel-kalman-filter-block\builder.sce"
],
"options": {
"cwd": "${workspaceFolder}\\spacecraft-gnc-tbx-devel-kalman-filter-block"
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"detail": "Run Scilab script using scilab-cli.exe"
},
{
"label": "New Task",
"type": "shell",
"command": "echo 'Hello, World!'",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "New Task",
"type": "shell",
"command": "echo 'Hello, World!'",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
Add it like this
"args": [
"-quit",
"-f",
"${workspaceFolder}\\spacecraft-gnc-tbx-devel-kalman-filter-block\builder.sce"
]
S.
Hello,
Your executable name is wrong
- scilex.exe to java/gui/xcos disable
- wscilex-cli.exe to java/gui/xcos enable but without graphical console.
- wscilex.exe to enable all features and graphical console.
In your case, I guess you want to use wscilex-cli.exe
Hi,
We release the first version of the Scilab Extension for VS Code.
You can find it on the VS Code marketplace or in VS Code under Scilab Language Support.
You must install the new release of Scilab 2025.0.0 to use it.
Here are the kinds of task.json and launch.json I’m using to build, load, and execute a file used to develop a toolbox:
task.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "build toolbox",
"type": "shell",
"command": "C:\\PROGRA~1\\scilab-2025.0.0\\bin\\WScilex-cli.exe",
"args": ["-f", "builder.sce", "-quit"],
"problemMatcher": []
}
]
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "scilab",
"request": "launch",
"name": "build & load & current",
"file": "${file}",
"workingDirectory": "${workspaceFolder}",
"keepAlive": true,
"args": ["-f", "${workspaceFolder}/loader.sce"],
"preLaunchTask": "build toolbox"
}
]
}
When starting a debug session, this configuration will:
- Build the toolbox using the defined task: “preLaunchTask”: “build toolbox”
- Launch Scilab and load the toolbox: “args”: [“-f”, “${workspaceFolder}/loader.sce”]
- Execute the current opened file in VS Code with the debugger: “file”: “${file}”
- Keep the debug session alive when the execution is done: “keepAlive”: true
Feel free to let us know if this fits your needs