# Code completion not working

**URL:** <https://scilab.discourse.group/t/code-completion-not-working/1042>\
**Category:** Visual Studio Code Extension\
**Tags:** vscode, resolved\
**Created:** [September 11, 2025, 6:09pm UTC](https://scilab.discourse.group/t/code-completion-not-working/1042 "2025-09-11T18:09:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![JD86](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@JD86](https://scilab.discourse.group/u/JD86)\
**Post date:** [September 11, 2025, 6:09pm UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/1 "2025-09-11T18:09:56Z")

</div>

Hi!

Scilab code completion/suggestions never worked on my setup, with it stuck at “starting”.  
I tried reinstalling both VSCode and Scilab, but did not work. I dug around and found the following:

 ![image](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/acb3cf14682d94d2b597cb16eb36f4419453ea97.png)

Tried to install different versions of the extension (1.0.0 - 1.0.5) but it still occurs.

Any idea how to fix? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![cedric.delamarre](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cedric.delamarre](https://scilab.discourse.group/u/cedric.delamarre)\
**Post date:** [September 24, 2025, 2:39pm UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/2 "2025-09-24T14:39:29Z")

</div>

Hi JD86, and welcome to the Scilab community 🙂

I do not reproduce your error. Can you tell me if you have toolboxes already installed in Scilab, and if it is failing at any word you are writing?

Cédric

---

<div class="post-metadata">

**Author:** ![JD86](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@JD86](https://scilab.discourse.group/u/JD86)\
**Post date:** [September 25, 2025, 3:36pm UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/3 "2025-09-25T15:36:20Z")

</div>

Hello, I don’t have any toolboxes installed, and VSCode mostly shows suggestions of words I’ve typed previously (variable names, functions) and the following, they work but the list ends there.

 ![image](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/061c9e67a5438f946471a3abd471fb2606077c72.png)

Autocompleting ‘function’ results to:  
”function output = name(input)

```
// Description of name(input)

```

endfunction”

But trying to autocomplete ‘inttrap‘ shows “No suggestions.“

---

<div class="post-metadata">

**Author:** ![cedric.delamarre](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cedric.delamarre](https://scilab.discourse.group/u/cedric.delamarre)\
**Post date:** [September 26, 2025, 7:47am UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/4 "2025-09-26T07:47:56Z")

</div>

About the autocompletion for the word `function`, you can autocomplete using the keyword (first row in the next screenshot) or the snippet that will create the function structure (the last row in the next screenshot).  
In your case, you had autocomplete using the snippet.

 ![image](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/c6f6210d7f1bb809652e7b517983d35f14c0941a.png)

I have reproduced what you described one or two times; it seems the issue occurred at the startup of VS Code. Autocompletion is populated using a running Scilab instance in the background, which may not be ready when you request completion.  
You can check the Scilab status in the bottom right of VS Code by clicking on the `{}`:

![image](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/36f64f27e544144a41738badc1f989a3e1d63346.png)

Have you experienced this issue after waiting for some seconds?

Can you give me the log of `Scilab Language Server` (as you do in your first message) and the log of `Scilab Extention Logs`when the problem occurs?

---

<div class="post-metadata">

**Author:** ![JD86](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@JD86](https://scilab.discourse.group/u/JD86)\
**Post date:** [September 27, 2025, 2:29am UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/5 "2025-09-27T02:29:32Z")

</div>

I have used VSCode for hours many times and gets stuck here (wasn’t able to post screenshot the first time 😅):

 ![image](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/779d1fc10924476e93c5516b19764936a12c8d3e.png)

Here are the logs for the Language Server:

> Scilab 2025.1.0 (May 22 2025, 12:21:05)  
> Scilab PID: 29336  
> Language Server and Debug Adapter Protocol loaded  
> at line 15 of executed file C:\Users\name\.vscode\extensions\scilab.scilab-1.0.5-win32-x64\toolbox\loader.sce
> 
> getPage: error on line #7: “Invalid index.”

And Extension Logs:

> e[34m  
> Activate Scilab extension !  
> e[34m  
> Testing Scilab  
> e[34m  
> C:\Program Files\scilab-2025.1.0\bin\WScilex-cli.exe -e try, exec(“c:\Users\name\.vscode\extensions\scilab.scilab-1.0.5-win32-x64\toolbox\loader.sce”); catch, mfprintf(0, “%s\n”, lasterror()); exit(42); end; exit(0);  
> e[34m  
> Scilab 2025.1.0 (May 22 2025, 12:21:05)  
> e[34m  
> Scilab PID: 13516
> 
> e[34m  
> Language Server and Debug Adapter Protocol loaded
> 
> e[34m  
> Testing Scilab closed with status 0  
> e[34m  
> Launch LSP  
> e[32m  
> Port found: 59221  
> e[34m  
> State change from Stopped to Starting

---

<div class="post-metadata">

**Author:** ![cedric.delamarre](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cedric.delamarre](https://scilab.discourse.group/u/cedric.delamarre)\
**Post date:** [September 29, 2025, 10:37am UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/6 "2025-09-29T10:37:39Z")

</div>

Can you open Scilab (without VSCode) and execute those commands?

```auto
getlanguage()
getHelpPage("cos")

```

---

<div class="post-metadata">

**Author:** ![JD86](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@JD86](https://scilab.discourse.group/u/JD86)\
**Post date:** [September 29, 2025, 1:13pm UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/7 "2025-09-29T13:13:23Z")

</div>

Here’s the result:

 ![image](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/7dc418c820e8726070c3584ac0e666acee418585.png)

---

<div class="post-metadata">

**Author:** ![cedric.delamarre](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cedric.delamarre](https://scilab.discourse.group/u/cedric.delamarre)\
**Post date:** [September 29, 2025, 1:52pm UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/8 "2025-09-29T13:52:26Z")

</div>

Thanks for the logs, I’ve reproduced your error and opened an issue: [inline doc fails for non existing language documentation (#17479) · Issues · scilab / scilab · GitLab](https://gitlab.com/scilab/scilab/-/issues/17479)

What you can do for now is to use `en_US`as the default language in Scilab.  
To do that, execute this command:`setdefaultlanguage("en_US")`

Let me know if it works 🙂

---

<div class="post-metadata">

**Author:** ![JD86](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@JD86](https://scilab.discourse.group/u/JD86)\
**Post date:** [September 29, 2025, 2:00pm UTC](https://scilab.discourse.group/t/code-completion-not-working/1042/9 "2025-09-29T14:00:30Z")

</div>

Ran the command in SciLab (outside of VSCode) and ran VSCode, it now works:

 ![image](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/40c81a43fc1daf7b35c04f8db609e352da102e69.png)  
Thank you! 😊
