Breakpoints in Run Section

I have my code broken up into sections, but if I set a breakpoint and then "Run Section", it ignores the breakpoint. Is there a way to use breakpoints with "Run Section"?

답변 (2개)

Omar
Omar 2018년 4월 24일

7 개 추천

There is a way, simply write the word 'keyboard' where you want your 'Run Section' to stop, and it will enter debug mode at that line.

댓글 수: 1

Shahrokh Abbasi-Rad
Shahrokh Abbasi-Rad 2018년 8월 10일
This was actually a good way and I liked it, but it doesn't go to any loop and that's its limitation.

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

Sean de Wolski
Sean de Wolski 2013년 5월 16일

3 개 추천

Nope.
When you "Run Section" what's essentially happening is:
eval(Section_Contents)
Thus there is no way to have break points. I agree this can be pretty frustrating. A workaround is to put a break point on the first line of a section, then run the file the normal way. You can now run the section while in debug mode.

카테고리

도움말 센터File Exchange에서 Entering Commands에 대해 자세히 알아보기

질문:

2013년 5월 16일

댓글:

2018년 8월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by