MATLAB-extension-for-vscode icon indicating copy to clipboard operation
MATLAB-extension-for-vscode copied to clipboard

Error Connecting to VSCode

Open Oatu4396 opened this issue 9 months ago • 4 comments

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.

Oatu4396 avatar Apr 29 '24 05:04 Oatu4396

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: image

Oatu4396 avatar Apr 29 '24 05:04 Oatu4396

Hi @Oatu4396, thanks for raising this issue.

Can you share the following info?

  1. The log files from the MATLAB language server (the log directory can be found at the top of the output log)
  2. The value of your install path setting
  3. Is your system maca or maci?
  4. Is your MATLAB installation maca or maci? In /Applications/MATLAB_R2024a.app/bin, do you see a maca or a maci directory?
  5. 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.

dklilley avatar Apr 29 '24 15:04 dklilley

(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. image

Oatu4396 avatar Apr 29 '24 15:04 Oatu4396

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:

image

Here is what the top of the VSCODE-OUTPUT section looks:

image (1000+ lines of java code) image

bobbyocean avatar May 15 '24 04:05 bobbyocean