How do I debug my live script?

6 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 4 de Mzo. de 2016
Comentada: Steven Lord el 23 de Feb. de 2018
Can I place break points in my live script to perform debugging as I would with regular script files?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 4 de Mzo. de 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.
 

Más respuestas (1)

Jon
Jon el 25 de Nov. de 2017
Am I to assume this is still true for 2017b?
JHS
  2 comentarios
Jon
Jon el 30 de Nov. de 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 el 23 de Feb. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Debugging and Analysis en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by