mathworks / MATLAB-extension-for-vscode

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
https://marketplace.visualstudio.com/items?itemName=MathWorks.language-matlab
MIT License
234 stars 15 forks source link

MATLAB was unable to start #164

Open sbom641 opened 2 months ago

sbom641 commented 2 months ago

I am unable to run any MATLAB files in VScode with the MATALB extension for VScode. The error I get seems to suggest it is an error due to erroneous MATLAB PATH, but I have double-triple checked the path.

VS code - 1.91.1 MATLAB - 2023b Matlab Extension for VS Code - v1.2.4 Windows - 11Pro 23H2

image

image

This is the only error message I keep getting: image (I do not get/see any errros outputed to the OUTPUT tab in VS Code)

Edit 1: Running matlab from the system command window succesfully does launch Matlab

Any help is appreciated.

dklilley commented 2 months ago

Thanks for moving this to a new issue!

Can you share the log files after attempting to connect? You can find the log directory at the top of the Output tab in VS Code.

sbom641 commented 2 months ago

I am not entirely sure if you are reffering to the following error log, but this is the output from the MATLAB Language Server.

image

image

dklilley commented 2 months ago

Thank you for sharing those. I agree that the error would indicate that the path should be incorrect, but clearly it is correct.

I would like to do some additional debugging to try to figure out what is happening. Could you reach out to support@mathworks.com to open a tech support case? Please reference this issue, and indicate that I have requested that the case be escalated to me.

willowfly commented 2 months ago

come up with the same issure ~

TSUNAMI-SHEN commented 1 month ago

I would like to ask if this problem has been solved

dklilley commented 1 month ago

Unfortunately no, it is not yet known why this issue is occurring.

Can you try the following: Does the matlab system command (run from a system terminal) correctly start the MATLAB application? If so, try removing any value from the MATLAB: Install Path setting in VS Code. Does this enable MATLAB to connect? If not, it would be helpful to share the logs from the language server.

stevemolde commented 1 month ago

I'm having the same issue. The matlab system command correctly starts MATLAB. I removed the value from MATLAB: Install Path, but there is still no connection. I'm not sure how to share the logs of the language server.

thelongcommute commented 1 month ago

I have the same issue. The Matlab VScode extension was working fine yesterday with Matlab2023b and then today it stopped working with both Matlab 2023b and 2024a. This is what I see for the output from the Matlab Language Server. Note I was changing the Install path from 2023b to 2024a to see if it resolved the problem.

image

dklilley commented 1 month ago

We are still working to identify the cause of this, but unfortunately have not been able to reproduce it ourselves.

@thelongcommute - do you happen to know if there were any changes made to your setup which may have coincided with this breaking (any OS/software updates, an update of the extension or MATLAB, any new VS Code extensions installed, etc.)?

thelongcommute commented 1 month ago

Hello @dklilley. Thank you for the quick response!

I do not believe any changes were made to my setup. I restarted my computer for the first time in a few days. I had a OS update earlier this week but have been using the extension since. I have 'auto update' turned on for the Matlab extension so I believe the last time it was updated was probably around 2024-08-16 on the release of 1.2.5 . I have no installed any new vscode extensions in the past few days.

I have noticed that I cant launch Matlab 2023b anymore through the normal Matlab App. I just see the launching page but the Matlab App never opens. I tried uninstalling and re-installing the App but that does not resolved the problem. I have both Matlab 2024a and 2023b installed on my computer and Matlab 2024a still behaves correctly through the App, but does not work with VScode either.

Looking forward to a solution as I was really enjoying the Vscode extension!

dklilley commented 1 month ago

Thanks for the extra info!

It sounds like the issue with R2023b is unrelated to the VS Code extension. If you would like to resolve that issue, I would recommend reaching out to MathWorks technical support.

I will be continuing to look into the issue with starting MATLAB from the VS Code extension, and will update this issue when I have more information.

darkEnvious commented 3 weeks ago

Hi, any update on this issue on the MATLAB 2024a front? I'm unable to use the extension to connect MATLAB to VSCode. Any help is much appreciated, TIA!

image

dklilley commented 3 weeks ago

We are still trying to determine the cause of this issue.

It seems that this may be related to a permissions issue, but we have not been able to reproduce this ourselves. Can you try launching VS Code as an administrator and report back whether MATLAB was able to connect or if there is any change in the error you are seeing in the Output window in VS Code?