How can I disable all the breakpoints that have been set in a MATLAB code file in MATLAB 7.6(R2008a) ?
조회 수: 11 (최근 30일)
이전 댓글 표시
I want to disable all the breakpoints in a MATLAB code file, from the command prompt. I do not want to right click on each break point and select the "Disable Breakpoint" option.
채택된 답변
MathWorks Support Team
2010년 1월 27일
To disable all the break points in a MATLAB code file, you need to set the expression property of the breakpoints on all lines to 'false'. The following code disables all the breakpoints in the same file.
s = dbstatus
s.expression(:) = {'false'}
dbstop(s)
The structure 's' contains the line numbers of all the breakpoints, with the corresponding expression values of these break points.
댓글 수: 1
Adam Danz
2025년 4월 23일
Note that this will disable conditional break points but it will also conver them to a simple break point that, when re-enabled, will no longer be conditional.
To disable a conditional break point without eliminating the condition, replace the expression with "false&&(__)" where the "__" contains the original condition.
For example, let's say the conditional breakpoint is "n>0.5". s.Expressions will be {'n>0.5'}. To disable that without eliminating the condition, replace it with {'false&&(n>0.5)'}.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Debugging and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!