How do I debug my live script?
6 views (last 30 days)
Show older comments
MathWorks Support Team
on 4 Mar 2016
Commented: Steven Lord
on 23 Feb 2018
Can I place break points in my live script to perform debugging as I would with regular script files?
Accepted Answer
MathWorks Support Team
on 4 Mar 2016
Visual debugging is not supported as of the current release (R2016a), but you can perform command line debugging – e.g:
>> dbstop myfile.mlx
>> myfile
>> dbstep
You will see your output and figures in their traditional form.
0 Comments
More Answers (1)
Jon
on 25 Nov 2017
Am I to assume this is still true for 2017b?
JHS
2 Comments
Jon
on 30 Nov 2017
I am running 2017b and don't see any menus for setting breakpoints. Also right clicking on lines doesn't give the possibility of introducing breakpoints. I find this very limiting. In general, I do not like the idea of having separate editors. There should just be one editor, and if you want you can turn on the "Live Script" features. Actually at the moment it seems like there are at least three separate editors The regular editor, the Live Script editor, and the App Builder editor. You end up with code in all of these separate editors and then have to open each one individually, and try to remember where the code for each part lives. Hopefully some further integration of these pieces will come soon. I especially would like to be able to debug my Live Scripts
Steven Lord
on 23 Feb 2018
adams13, I'm not quite sure what you mean when you say 'it gets totally useless if a "life script"[sic] is stored in a binary compressed form.'
If you're using the comparison tool in MATLAB (the Compare button on the Home tab of the Toolstrip or the visdiff function), it should be able to compare two live scripts and show you the differences.
If you're using some other source control tool with release R2016b or later you can configure it to use the MATLAB Comparison tool (which knows how to compare live scripts, MAT-files, and Simulink models) to diff and merge live scripts.
See Also
Categories
Find more on Debugging and Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!