How do I debug my live script?

조회 수: 7 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2016년 3월 4일
댓글: Steven Lord 2018년 2월 23일
Can I place break points in my live script to perform debugging as I would with regular script files?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2016년 3월 4일
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.
 

추가 답변 (1개)

Jon
Jon 2017년 11월 25일
Am I to assume this is still true for 2017b?
JHS
  댓글 수: 2
Jon
Jon 2017년 11월 30일
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 2018년 2월 23일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by