Filter löschen
Filter löschen

How do I debug my live script?

10 Ansichten (letzte 30 Tage)
MathWorks Support Team
MathWorks Support Team am 4 Mär. 2016
Kommentiert: Steven Lord am 23 Feb. 2018
Can I place break points in my live script to perform debugging as I would with regular script files?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 4 Mär. 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.
 

Weitere Antworten (1)

Jon
Jon am 25 Nov. 2017
Am I to assume this is still true for 2017b?
JHS
  2 Kommentare
Jon
Jon am 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
Steven Lord am 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Debugging and Analysis finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by