Debug /pause at every function definition line (local function or function script) without explicit breakpoints
조회 수: 1 (최근 30일)
이전 댓글 표시
Dear All,
I am trying to debug a GUI associated with a (new to me) code package, containing m scripts with multiple local functions/subfunctions, and also function scripts. During certain GUI operations, the code executions hops from one function to another. Is there a way to pause in debug mode at the function definition line of any function/subfunction within a particular script, or when hopping to another function script, without declaring any breakpoints beforehead (since I do not know which scripts/functions the GUI uses a priori)?
Thank you,
OL
댓글 수: 0
채택된 답변
Steven Lord
2020년 3월 18일
There's no way to say "stop whenever a new function gets called" in debug mode without setting breakpoints.
But if you're debugging your code you can "Step In" to the function that gets called on a particular line. You can also "Run to Cursor" to move your cursor to a particular line and automatically execute up to that point. See the "Step Through File" section on this documentation page for more information.
댓글 수: 2
Steven Lord
2020년 3월 19일
Setting an error breakpoint should work to stop the GUI processing and drop into debug mode when an error occurs.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Naming Conventions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!