Describe the bug
When a MATLAB script contains clear;, close all;, and figure; together, variables created by running the script do not appear in the VS Code Workspace sidebar.
The variables do exist in the MATLAB workspace and can be seen in the external MATLAB Workspace window opened with the workspace command. The issue seems to be specific to the VS Code Workspace sidebar not refreshing or syncing correctly.
To Reproduce
Steps to reproduce the behavior:
- Open VS Code with the MATLAB extension active.
- Create a MATLAB script file with the following content:
clear;
close all;
a = 1
figure;
- Type
workspace in the MATLAB terminal to open the external MATLAB Workspace window.
- Run the script in VS Code.
- Check the VS Code Workspace sidebar. Observe that variable
a is not shown in the VS Code Workspace sidebar.
- Observe that variable
a is shown correctly in the external Workspace window.
Expected behavior
The VS Code Workspace sidebar should display variable a after the script finishes running, since the variable exists in the MATLAB workspace.
Screenshots
Useful Information
- MATLAB Version: 2023b
- OS Version: Win 11
- VS Code Version: 1.124.2
- MATLAB Extension Version: v1.3.12
Describe the bug
When a MATLAB script contains
clear;,close all;, andfigure;together, variables created by running the script do not appear in the VS Code Workspace sidebar.The variables do exist in the MATLAB workspace and can be seen in the external MATLAB Workspace window opened with the
workspacecommand. The issue seems to be specific to the VS Code Workspace sidebar not refreshing or syncing correctly.To Reproduce
Steps to reproduce the behavior:
workspacein the MATLAB terminal to open the external MATLAB Workspace window.ais not shown in the VS Code Workspace sidebar.ais shown correctly in the external Workspace window.Expected behavior
The VS Code Workspace sidebar should display variable
aafter the script finishes running, since the variable exists in the MATLAB workspace.Screenshots
Useful Information