Back in April last year, I announced the MATLAB extension for Visual Studio Code on The MATLAB Blog and everyone at MathWorks was blown away by its popularity. In less than a year there have been over 150,000 installs of the MATLAB extension via the Visual Studio Marketplace, the announcement blog post is one of the most popular blogs across all of MATLAB Central and there has been a lot of active discussion on the extension’s GitHub repository including enhancement requests and bug reports. It’s safe to say that it has been a great success. Pull requests are welcome
We've also had pull requests from Doron Behar and Moeta Yuko fixing various things. Thank you so much to everyone who has contributed so far and we look forward to more collaboration with the community. Listening to your feedback
Being a developer, product manager or advocate of any popular piece of software can be a wild ride emotionally. On the one hand, you get great feedback like this
Positive with a side order of constructive suggestion, something we can work with. We received many comments like this in social media, via email and in one to one discussions with users. However, we also received a few comments like this.
Ouch! Clearly, we fell way below this user’s expectations and we are sorry that the first release may have come up short for some users. We didn’t want to allow “perfect” to be the enemy of “good” and we felt the first release had a lot of useful functionality, so we released it into the wild. Our goal was to provide a solid foundation that could be built upon quickly in collaboration with the community and it's working! Over 150,000 users so far, contributions from the community and fast iteration on bug fixes. There have been 10 updates since the first release in less than a year. We are really happy with these results. Giving you what you want: MATLAB code execution from Visual Studio Code
So now we've got it. Ensure that you've installed at least version 1.2.0 of the MATLAB extension for Visual Studio Code alongside a copy of MATLAB that's at R2021a or above and you can run MATLAB programs right from Visual Studio Code. As you can see, just push the run button and your code will run in the MATLAB terminal. You can either continue editing or interact with the terminal further, whatever suits you best at the time.
Plots are rendered in a separate window, exactly as if you had run them from MATLAB Desktop.
Speaking of MATLAB Desktop, you can access that at any time by typing desktop into the Visual Studio Code MATLAB terminal. It will be connected to the same workspace you are using from Visual Studio Code.
What we haven't given you: Debugging
The addition of code execution to the MATLAB extension for Visual Studio Code makes it much more useful and we hope you'll like it. The next obvious thing to request is debugging support and, if this important to you, please do add your voice to the discussion over at the issues section on GitHub along with everything else that you'd like. The team are enjoying developing and delivering this functionality to you and we look forward to seeing you play with it, discussing it and letting us know what you want next!
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.