mathworks / mathworks/MATLAB-extension-for-vscode
Matlab Does Not Run Codes on Visual Studio Code
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 435
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
I have Visual Studio Code Version: 1.89.1 with Matlab extension v1.2.2, I have Matlab R2024a.
Everything seems working but when I try to run a Matlab code in Visual Studio code, it gives me notification that "File is not found in the current folder or on the MATLAB path" after I click on "Add to Path" then I receive Unrecognized function or variable on terminal.
To Reproduce
Steps to reproduce the behavior:
- Go to 'my a.m file'
- Click on '.Run'
- Scroll down to 'Terminal'
- See error "Unrecognized function or variable a"
Expected behavior
I expected matlab code be running and generating plots and results.
Screenshots
Useful Information
- OS Version: Sonoma14.5
- VS Code Version: 1.89.1
Thank you for your help in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Run action for the reported a.m file in Visual Studio Code with MATLAB R2024a, then inspect how the extension handles the current folder and MATLAB path when launching the terminal. Done means the file runs from the Run command and produces its expected plots and results without the path or unrecognized-variable errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matlab, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100