mathworks / mathworks/MATLAB-language-server

Misleading error message when connecting to MATLAB after cancelling a previous attempt

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
125
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
When MATLAB is killed while the language server is connecting to it, attempting to connect again will display the following error in the log: matlabls - ERROR: Failed to connect to MATLAB

Although everything works as expected, this error message should not be displayed at this time.

To Reproduce
Steps to reproduce the behavior (using the MATLAB extension for VS Code):

  1. Attempt to connect to MATLAB through the extension
  2. Before the connection is established, kill the MATLAB process
  3. Attempt to connect to MATLAB again - this will connect successfully, but will display the error mentioned above

Expected behavior
The error message should not display upon reconnecting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reconnect sequence through the MATLAB extension for VS Code: kill MATLAB during the first connection attempt, then reconnect. Trace the language server's connection and error logging flow; done means a successful reconnect no longer emits the misleading failure message.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.