필터 지우기
필터 지우기

Debug stack on error

조회 수: 5 (최근 30일)
Alexandra
Alexandra 2020년 8월 28일
댓글: Alexandra 2020년 9월 3일
Dear all,
since I use the newer version of Matlab, I habe a problem with the debug mode. Whenever I use dbstop if error, the debugger stops miles deep in some Matlab functions and not at the position of the error. Even if I try to step through the call stack, I only step though a lot of Matlab functionality until I end up outside of debug mode.
Why is this happening? I really loved to use dbstop if error and now it is useless to me.
Best regards
  댓글 수: 15
Adam Danz
Adam Danz 2020년 9월 2일
@Bjorn, 😃 I know exactly what you're talking about. The problem with commenting-out the try/catch in this case is that it's part of a Matlab function so alterations to that file are not an option. The OP could write her own try/catch around the problematic section of code to troubleshoot that way, though.
Alexandra
Alexandra 2020년 9월 3일
Usually, I set a breakpoint on the line (as suggested), but if the error doesn't occur very often, I used to do "dbstop if error". But using a try and catch block around the section works well, too. Thank you for all the suggestions :-)

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

답변 (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