Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,17 @@
"node_modules",
"**/*.d.ts",
"webpack.config.js"
],
"overrides": [
{
"files": ["src/test/workspacebrowser/**/*.ts"],
"rules": {
// Chai assertions (expect(x).to.be.true) are property accesses that
// trigger no-unused-expressions. This is a known Chai/ESLint conflict.
"@typescript-eslint/no-unused-expressions": "off",
// Mock stubs and disposables use empty function bodies as intentional no-ops.
"@typescript-eslint/no-empty-function": "off"
}
}
]
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.3.12] - 2026-06-15

### Added
- Interactively inspect the MATLAB workspace in the MATLAB view with support for renaming, sorting, and deleting variables (Addresses [mathworks/MATLAB-extension-for-vscode#100](https://github.com/mathworks/MATLAB-extension-for-vscode/issues/100))
- Improved formatting of warnings in output
- Support for the diary command (Addresses [mathworks/MATLAB-extension-for-vscode#186](https://github.com/mathworks/MATLAB-extension-for-vscode/issues/186))
- Support for word-based navigation and editing keyboard shortcuts in the MATLAB Terminal, including Ctrl+Left/Right to move by word, Ctrl+Shift+Left/Right to select by word, and Ctrl+Backspace/Delete to delete words (Addresses [mathworks/MATLAB-extension-for-vscode#249](https://github.com/mathworks/MATLAB-extension-for-vscode/issues/249))

## [1.3.11] - 2026-05-08

### Added
Expand Down
108 changes: 59 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ You can use this extension with or without MATLAB installed on your system. Howe

**Note:** This extension no longer supports MATLAB R2021a. To use advanced features or run MATLAB code, you must have MATLAB R2021b or later installed.

## Table of Contents
1. [Installation](#installation)
2. [Get Started](#get-started)
3. [Run and Debug MATLAB Code](#run-and-debug-matlab-code)
4. [View MATLAB Workspace Contents](#view-matlab-workspace-content)
5. [Work with MATLAB Projects](#work-with-matlab-projects)
6. [Run MATLAB In Jupyter Notebooks](#run-matlab-in-jupyter-notebooks)
7. [Configuration](#configuration)
8. [Troubleshooting](#troubleshooting)
9. [Contact Us](#contact-us)
10. [Release Notes](#release-notes)

## Installation
You can install the extension from within Visual Studio Code or download it from [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=MathWorks.language-matlab). After installing the extension, you might need to configure it to make full use of all the features. For more information, see the [Configuration](#configuration) section.

Expand Down Expand Up @@ -47,6 +59,22 @@ There are some limitations to running and debugging MATLAB code in Visual Studio
* When using the **dbstop** and **dbclear** functions to set and clear breakpoints, the breakpoints are added to file but are not shown in Visual Studio Code.
* Variable values changed in the MATLAB terminal when Visual Studio Code is paused do not update in the **Run and Debug** view until the next time Visual Studio Code pauses.

## View MATLAB Workspace Content
If you have MATLAB R2023a or later installed on your system, you can interactively inspect the MATLAB workspace by opening the MATLAB view in Visual Studio Code. In the Workspace section of the MATLAB view, you can interactively manage variables in the MATLAB workspace while you run and debug MATLAB code. To access the MATLAB view, select the MATLAB icon in the Activity Bar on the left side of the Visual Studio Code window, which opens the view in the Side Bar.

In the Workspace section of the MATLAB view, you can:
* View the name, value, size, and class of each variable in the MATLAB workspace.
* Interactively rename, delete, and sort variables in the MATLAB workspace.

**Tip:** To access the MATLAB Workspace while debugging, drag the MATLAB icon from the Activity bar into the Run and Debug view. This adds the Workspace section of the MATLAB view to the Run and Debug view.

![MATLAB Workspace Screenshot](public/Workspace.png)

### Limitations
* Interactively editing workspace variables in the Workspace section of the MATLAB view is limited to inline edits. Editing complex data types such as matrices, cells, and structs is not supported.
* Multi-row selection is not supported.
* Refreshing the workspace is not supported.

## Work with MATLAB Projects
If you have MATLAB R2021b or later installed on your system, you can work with MATLAB Projects directly in Visual Studio Code. You can create new projects, open existing projects, and close the current project.

Expand All @@ -62,11 +90,16 @@ You also can use this extension along with the Jupyter Extension for Visual Stud
## Configuration
To configure the extension, go to the extension settings and select from the available options.

### MATLAB Default Editor Setting
### MATLAB Settings
#### MATLAB Default Editor Setting
By default, the extension uses the editor specified in the MATLAB Editor/Debugger settings to open files with the MATLAB `edit` and `open` commands. To make Visual Studio Code the default editor for these commands, set the `MATLAB.defaultEditor` setting to `true`. To revert to using the editor specified in the MATLAB Editor/Debugger settings, set `MATLAB.defaultEditor` to `false`.
**Note:** Certain file types always open in MATLAB by default — for example, live scripts saved in the binary Live Code file format (.mlx) and MATLAB app files (.mlapp).

### MATLAB Install Path Setting
#### MATLAB Index Workspace Setting
By default, the extension indexes all the MATLAB code files (`.m`) in your current Visual Studio Code workspace. Indexing allows the extension to find and navigate between your MATLAB code files.
You can disable indexing to improve the performance of the extension. To disable indexing, set the `MATLAB.indexWorkspace` setting to `false`. Disabling indexing can cause features such as code navigation not to function as expected.

#### MATLAB Install Path Setting
If you have MATLAB installed on your system, the extension automatically checks the system path for the location of the MATLAB executable. If the MATLAB executable is not on the system path, you may need to manually set the `MATLAB.installPath` setting to the full path of your MATLAB installation. For example, `C:\Program Files\MATLAB\R2022b` (Windows®), `/Applications/MATLAB_R2022b.app` (macOS), or `/usr/local/MATLAB/R2022b` (Linux®).

You can determine the full path of your MATLAB installation by using the `matlabroot` command in MATLAB.
Expand All @@ -81,40 +114,48 @@ In the extension settings, set the `MATLAB.installPath` setting to the value ret

![MATLAB Install Path Setting](public/InstallPathSetting.png)

### MATLAB Automatically Start Debugger Setting
By default, the extension does not automatically start the Visual Studio Code debugger when MATLAB reaches a breakpoint. To enable automatically starting the Visual Studio Code debugger, set the `MATLAB.startDebuggerAutomatically` setting to `true`. When starting the Visual Studio Debugger is disabled, MATLAB still stops at breakpoints, and you can debug your code in the MATLAB terminal using the MATLAB debugging functions.

### MATLAB Index Workspace Setting
By default, the extension indexes all the MATLAB code files (`.m`) in your current workspace. Indexing allows the extension to find and navigate between your MATLAB code files.
You can disable indexing to improve the performance of the extension. To disable indexing, set the `MATLAB.indexWorkspace` setting to `false`. Disabling indexing can cause features such as code navigation not to function as expected.

### MATLAB Connection Timing Setting
#### MATLAB Connection Timing Setting
By default, the extension starts MATLAB in the background when you open a MATLAB code file in Visual Studio Code. To control when the extension starts MATLAB, set the `MATLAB.matlabConnectionTiming` setting to one of these values:
* `onStart` (default) — Start MATLAB as soon as a MATLAB code file is opened.
* `onDemand` — Start MATLAB only when needed for a given action.
* `never` — Never start MATLAB.
Note: Some functionality is available only with MATLAB running in the background.

### MATLAB Max File Size for Analysis Setting
#### MATLAB Max File Size for Analysis Setting
By default, the extension analyzes all files, regardless of their size, for features such as linting, code navigation, and symbol renaming. To limit the maximum number of characters a file can contain, set the `MATLAB.maxFileSizeForAnalysis` setting. For example, to limit the number of characters to 50,000, set the `MATLAB.maxFileSizeForAnalysis` setting to `50000`. If a file contains more than the maximum number of characters, features such as linting, code navigation, and symbol renaming are disabled for that file. To remove the limit and analyze all files regardless of their size, set the `MATLAB.maxFileSizeForAnalysis` setting to `0`.

### MATLAB Show Feature Not Available Error Setting
#### MATLAB Prewarm Graphics Setting
By default, MATLAB services are started early to improve the first-time performance of MATLAB figure rendering. To disable this behavior, set the `MATLAB.prewarmGraphics` setting to `false`.
This setting is supported with MATLAB R2025a and later. For earlier releases, this setting is ignored.

#### MATLAB Show Feature Not Available Error Setting
By default, the extension displays an error when a feature requires MATLAB and MATLAB is unable to start. To not display an error, set the `MATLAB.showFeatureNotAvailableError` setting to `false`.

### MATLAB Sign In Setting
#### MATLAB Sign In Setting
By default, the extension assumes that the MATLAB installation specified in the Install Path setting is activated.

To enable browser-based sign in to your MathWorks account using the Online License Manager or a Network License Manager, set the `MATLAB.signIn` setting to true. When this setting is enabled, the extension prompts you to sign in when it starts MATLAB.

### MATLAB Telemetry Setting
#### MATLAB Start Debugger Automatically Setting
By default, the extension does not automatically start the Visual Studio Code debugger when MATLAB reaches a breakpoint. To enable automatically starting the Visual Studio Code debugger, set the `MATLAB.startDebuggerAutomatically` setting to `true`. When starting the Visual Studio Debugger is disabled, MATLAB still stops at breakpoints, and you can debug your code in the MATLAB terminal using the MATLAB debugging functions.

#### MATLAB Telemetry Setting
You can help improve the extension by sending user experience information to MathWorks®. By default, the extension sends user experience information to MathWorks. To disable sending information, set the `MATLAB.telemetry` setting to `false`.

For more information, see the [MathWorks Privacy Policy](https://www.mathworks.com/company/aboutus/policies_statements.html).

### MATLAB Prewarm Graphics Setting
By default, MATLAB services are started early to improve the first-time performance of MATLAB figure rendering. To disable this behavior, set the `MATLAB.prewarmGraphics` setting to `false`.
This setting is supported with MATLAB R2025a and later. For earlier releases, this setting is ignored.
### MATLAB Workspace Settings
#### MATLAB Maximum Workspace Variables Setting
By default, the extension displays up to 500 variables in the Workspace section of the MATLAB view. Limiting the number of displayed variables can improve performance, especially when working with large workspaces. If the MATLAB workspace contains more variables than the specified limit, the extension displays the first variables in the sorted list, up to the configured maximum.

To control how many variables to display, set the `MATLAB.maximumWorkspaceVariables` setting. For example, set the `MATLAB.maximumWorkspaceVariables` setting to `100` to display up to 100 variables.

#### MATLAB Workspace Sort Method Setting
By default, variables in the Workspace section of the MATLAB view are sorted alphanumerically.
To change the sort method, set the `MATLAB.workspaceSortMethod` setting to one of these values:

* `Natural (default)` — Compare numbers within names by numeric value. **Example**: [var1, var2, var10]
* `Lexicographic` — Compare names character by character. **Example**: [var1, var10, var2].

## Troubleshooting
If the MATLAB install path is not properly configured, you get an error when you try to use certain advanced features, such as document formatting and code navigation.
Expand All @@ -126,35 +167,4 @@ We encourage all feedback. If you encounter a technical issue or have an enhance

## Release Notes

For a complete list of changes, see the [CHANGELOG](CHANGELOG.md).

### 1.3.0
Release date: 2024-12-18

Added:
* Debugging support
* Support for inserting code snippets shipped with MATLAB (requires MATLAB R2025a or later)
* Support for opening additional MATLAB file types (e.g. `.slx`, `.fig`) from the Visual Studio Code context menu (Community contribution from @Gusmano-2-OSU)

Fixed:
* Syntax highlighting improvements (Community contribution from @apozharski)

### 1.2.0
Release date: 2024-03-05

Added:
* Code execution support

### 1.1.0
Release date: 2023-06-05

Added:
* Document symbol and outline support

Fixed:
* Code folding no longer matches `end` when used in strings, comments, and to denote the end of a matrix

### 1.0.0
Release date: 2023-04-26

* Initial release.
For a complete list of changes, see the [Change Log](CHANGELOG.md).
Loading
Loading