Skip to content

Commit df2f269

Browse files
authored
Merge pull request #193 from mathworks/dklilley/release/1.3.0
MATLAB extension for VS Code - v1.3.0
2 parents 50dcd07 + 305ff6e commit df2f269

19 files changed

+1162
-577
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@typescript-eslint/semi": "off",
2121
"@typescript-eslint/no-inferrable-types": "off",
2222
"@typescript-eslint/promise-function-async": "off",
23+
"@typescript-eslint/consistent-type-assertions": "off",
2324
"@typescript-eslint/indent": ["error", 4, {
2425
"SwitchCase": 1,
2526
"VariableDeclarator": 1,

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.3.0] - 2024-12-18
11+
12+
### Notice
13+
- This extension no longer supports MATLAB R2021a. To make use of the advanced features of the extension or run and debug MATLAB code, you must have MATLAB R2021b or later installed.
14+
1015
### Added
11-
- Open non-code MATLAB files (e.g. `.slx`, `.fig`) via the context menu
16+
- Debugging support
17+
- Support for inserting code snippets shipped with MATLAB (requires MATLAB R2025a or later)
18+
- Support for opening additional MATLAB file types (e.g. `.slx`, `.fig`) from the Visual Studio Code context menu (Community contribution from @Gusmano-2-OSU)
19+
20+
### Fixed
21+
- Syntax highlighting improvements (Community contribution from @apozharski)
22+
- Patches CVE-2024-21538, CVE-2024-52798, and CVE-2024-55565
1223

1324
## [1.2.7] - 2024-11-07
1425

README.md

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# MATLAB extension for Visual Studio Code
2-
This extension provides support for editing and running MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
2+
This extension provides support for editing, running, and debugging MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
33

4-
You can use this extension with or without MATLAB installed on your system. However, to make use of the advanced features of the extension or run MATLAB code, you must have MATLAB R2021a or later installed. For more information, see the [Get Started](#get-started) section.
4+
You can use this extension with or without MATLAB installed on your system. However, to make use of the advanced features of the extension or run MATLAB code, you must have MATLAB R2021b or later installed. For more information, see the [Get Started](#get-started) section.
55

6-
**Note:** This extension will no longer support MATLAB R2021a in a future release. To use advanced features or run MATLAB code, you will need to have MATLAB R2021b or later installed.
7-
8-
For an overview of some of the major features of this extension, you can watch the [Introducing the New MATLAB Extension for Visual Studio Code](https://www.youtube.com/watch?v=kYTBAr9LlGg) video.
6+
**Note:** This extension no longer supports MATLAB R2021a. To use advanced features or run MATLAB code, you must have MATLAB R2021b or later installed.
97

108
## Installation
119
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.
@@ -24,7 +22,7 @@ The extension provides several basic features, regardless of whether you have MA
2422

2523
### Advanced Features (requires MATLAB installed on your system)
2624
If you have MATLAB R2021a or later installed on your system, you have access to an additional set of advanced features. These features include:
27-
* Code execution
25+
* Code execution and debugging
2826
* Automatic code completion
2927
* Source code formatting (document formatting)
3028
* Code navigation
@@ -34,18 +32,21 @@ If you have MATLAB R2021a or later installed on your system, you have access to
3432

3533
![MATLAB Extension Demo](public/AdvancedFeatures.gif)
3634

37-
## Run MATLAB Code
38-
You can run a MATLAB code file or a selection within a MATLAB code file in Visual Studio Code using the Run button at the top of the file or the `Run File` or `Run Current Selection` commands. When you run the file, output displays in the "Terminal" pane of Visual Studio Code. You also can enter MATLAB code directly in the MATLAB terminal. To stop execution of MATLAB code, press **Ctrl+C**.
35+
## Run and Debug MATLAB Code
36+
To run a MATLAB code file in Visual Studio Code, click the Run button at the top of the file. You also can use the `Run File` or `Run Current Selection` commands. When you run the file, output displays in the "Terminal" pane of Visual Studio Code. You also can enter MATLAB code directly in the MATLAB terminal. To stop execution of MATLAB code, press **Ctrl+C**.
37+
38+
To debug a MATLAB code file, add breakpoints to the file by clicking the area to the left of an executable line. Then run the file. Visual Studio Code stops at the first breakpoint.
39+
When Visual Studio Code is paused, you can use the **Debug toolbar** to peforms debugging actions such as **Continue**, **Step into**, and **Stop**. You also can enter commands in the MATLAB terminal to perform debug actions or change variable values. Use the **Run and Debug** view to see your workspace variables, watch points, and call stack.
3940

40-
![MATLAB Execution Demo](public/CodeExecution.gif)
41+
![MATLAB Execution Demo](public/RunDebugCode.gif)
4142

4243
### Limitations
43-
There are some limitations to running MATLAB code in Visual Studio Code:
44-
* Debugging is not supported.
45-
* The **pause** and **input** functions are not supported.
44+
There are some limitations to running and debugging MATLAB code in Visual Studio Code:
4645
* Output from timers, callbacks, and DataQueue objects is not shown in the Command Window.
4746
* Creating a custom run configuration for a file is not supported.
48-
47+
* 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.
48+
* 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.
49+
* Changing which stack frame is selected in Visual Studio Code will not automatically change the workspace used by the MATLAB terminal when debugging
4950

5051
## Configuration
5152
To configure the extension, go to the extension settings and select from the available options.
@@ -65,6 +66,9 @@ In the extension settings, set the `matlab.installPath` setting to the value ret
6566

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

69+
### MATLAB Automatically Start Debugger Setting
70+
By default, the extension automatically starts the Visual Studio Code debugger when MATLAB reaches a breakpoint. To disable automatically starting the Visual Studio Code debugger, set the `matlab.automaticallyStartDebugger` setting to `false`. 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.
71+
6872
### MATLAB Index Workspace Setting
6973
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.
7074
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.
@@ -76,22 +80,24 @@ By default, the extension starts MATLAB in the background when you open a MATLAB
7680
* `never` — Never start MATLAB.
7781
Note: Some functionality is available only with MATLAB running in the background.
7882

79-
### MATLAB Telemetry Setting
80-
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`.
81-
82-
For more information, see the [MathWorks Privacy Policy](https://www.mathworks.com/company/aboutus/policies_statements.html).
83+
### MATLAB Max File Size for Analysis Setting
84+
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`.
8385

8486
### MATLAB Show Feature Not Available Error Setting
8587
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`.
8688

87-
### MATLAB Max File Size for Analysis Setting
88-
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`.
89-
9089
### MATLAB Sign In Setting
9190
By default, the extension assumes that the MATLAB installation specified in the Install Path setting is activated.
9291

9392
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.
9493

94+
### MATLAB Telemetry Setting
95+
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`.
96+
97+
For more information, see the [MathWorks Privacy Policy](https://www.mathworks.com/company/aboutus/policies_statements.html).
98+
99+
100+
95101
## Troubleshooting
96102
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.
97103

@@ -102,6 +108,16 @@ We encourage all feedback. If you encounter a technical issue or have an enhance
102108

103109
## Release Notes
104110

111+
### 1.3.0
112+
Release date: 2024-12-18
113+
Added:
114+
* Debugging support
115+
* Support for inserting code snippets shipped with MATLAB (requires MATLAB R2025a or later)
116+
* Support for opening additional MATLAB file types (e.g. `.slx`, `.fig`) from the Visual Studio Code context menu (Community contribution from @Gusmano-2-OSU)
117+
118+
Fixed:
119+
* Syntax highlighting improvements (Community contribution from @apozharski)
120+
105121
### 1.2.0
106122
Release date: 2024-03-05
107123

0 commit comments

Comments
 (0)