MATLAB-extension-for-vscode
MATLAB-extension-for-vscode copied to clipboard
Error Connecting to VSCode
I'm currently running MATLAB 2024a on MacOS Sonoma 14.2.1, with 1.2.1 MATLAB VSCode extension.
Each time I open VSCode the MATLAB Language Server shows
(01:23:48) matlabls: Launching MATLAB... (01:23:48) matlabls: MATLAB process (session 1) terminated (01:23:48) matlabls: Shutting down MATLAB session 1
and I've met the same problem on MATLAB 2023b so I believe it's not a version bug. Also, it should not be my path setting problem since it seems to successfully start MATLAB process but immediately shut down.
In the matlabLog.txt, it shows /Applications/MATLAB_R2024a.app/bin/matlab: line 397: awk: command not found /Applications/MATLAB_R2024a.app/bin/matlab: line 413: expr: command not found
I've checked my PATH and /usr/bin is inside.
and also, awk and expr commands are valid:
Hi @Oatu4396, thanks for raising this issue.
Can you share the following info?
- The log files from the MATLAB language server (the log directory can be found at the top of the output log)
- The value of your install path setting
- Is your system maca or maci?
- Is your MATLAB installation maca or maci? In
/Applications/MATLAB_R2024a.app/bin
, do you see amaca
or amaci
directory? - Do you see any errors if you launch MATLAB from the terminal using the following command?
/Applications/MATLAB_R2024a.app/bin/matlab -log -memmgr release -noAppIcon -nosplash -useStartupFolderPref -nodesktop
This is similar to how MATLAB is launched by the language server.
(11:01:50) matlabls: Log Directory: /var/folders/yb/bv4x7p390pz0hydvmmn1xmjw0000gp/T/matlabls_7719 (11:01:50) matlabls: Launching MATLAB... (11:01:50) matlabls: MATLAB process (session 1) terminated (11:01:50) matlabls: Shutting down MATLAB session 1
/Applications/MATLAB_R2024a.app
M1 Mac.
maca version. maca64 folder is inside.
The terminal successfully starts MATLAB.
I am getting the exact same errors as @Oatu4396. I am on RedHatEnterprise 8.9. MATLAB extensions 1.2.1. VScode 1.85.1. VScode remote SSH 0.107.1. I have reinstalled multiple times. I have tried matlab/r2021a, r2021b, r2022a, r2022b, r2023a, r2023b, and they all produce the same error. I have also rm -rf .vscode-server
and reinstalled. I can successfully launch matlab -nodisplay
just fine on the remote server. I also get the same output as @Oatu4396 when running the matlab -log -memmgr release -noAppIcon -nosplash -useStartupFolderPref -nodesktop
command in the terminal or in the vscode-terminal.
Only two files in matlabls_1496100 got created, matlabLog.txt and languageServerLog.txt. The file matlabls_conn.json was never created. Here is a dump of all files in the temp folder:
Here is what the top of the VSCODE-OUTPUT section looks:
(1000+ lines of java code)