Matlab not stopping on some breakpoints

조회 수: 127 (최근 30일)
Ray Harris
Ray Harris 2020년 7월 1일
댓글: Keenjhar 2024년 1월 3일
Matlab suddenly (this afternoon) stopped honoring some, but not all, of my breakpoints on a file I have been working on since this morning.
I tried reloading Matlab, but problem persisted.
I tried removing my only "clear" statement (I have no "clear all" statements) and it had no effect.
Matlab is useless fo rme until this gets fixed!!!!!
  댓글 수: 2
Adam Danz
Adam Danz 2020년 7월 1일
Have you tried removing all break points, saving the file, closing the file, reopening the file, and setting new break points?
This has never happened to me and I use debug mode with break points on a nearly daily basis for years.
Keenjhar
Keenjhar 2024년 1월 3일
yes but still it is not working

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

답변 (2개)

Image Analyst
Image Analyst 2020년 7월 1일
Yes, it can happen and I see it fairly often. It's usually when I do something like set breakpoints and run then stop at a breakpoint. Then change a variable name or edit the code somehow and set new breakpoint. Then it sometimes won't stop at the new breakpoints, I think because the file needs to be saved again. If I just exit and restart, then it will see the new breakpoints and stop at them.
  댓글 수: 3
Bogdan -Ervin
Bogdan -Ervin 2023년 10월 10일
편집: Bogdan -Ervin 2023년 10월 10일
In my case, even though the breakpoint is valid (it has the red color and the line doesn't have any error), the code will not stop at breakpoint. This happens in Matlab R2020a.
Image Analyst
Image Analyst 2023년 10월 10일
@Bogdan -Ervin then call tech support.

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


Gurpreet Singh
Gurpreet Singh 2020년 7월 1일
Hi Ray,
Please refer to the following Doc in MATLAB Command Window:
>>web(fullfile(docroot, 'matlab/debugging-code.html'))
You can also try to use the following command at the beginning of script:
>>dbstop if caught error
MATLAB will go to debug mode at the erroneous line, though this will probably stop more than the user wants.
You can also execute only selected code by keyboard shortcut F9.

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by