How to set "dbstop if error" only to stop in my code

조회 수: 9 (최근 30일)
ztjona
ztjona 2020년 7월 3일
댓글: ztjona 2020년 7월 4일
I use:
dbstop if error
often, to debug on any kind of error in my code.
The problem is that, when an error, it jumps to a breakpoint not only in my files, but in internal matlab functions.
And it is annoying trying to get out of those functions to reach my line where I did the error.

채택된 답변

the cyclist
the cyclist 2020년 7월 3일
I don't think that that is possible.
Are you aware of the "function stack" capability in the user interface? I show a screenshot below. This is an extremely quick way of getting out of the MATLAB built-ins and into your own function.
That pull-down menu lists the stack of functions to reach the breakpoint. I would definitely not describe it as "annoying trying to get out of those functions", so thought maybe you are unaware.
I hope that helps.
  댓글 수: 1
ztjona
ztjona 2020년 7월 4일
Ah, yeah, I did not know about it.
I think that solves my problem.

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

추가 답변 (0개)

카테고리

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