Why Don't Set Breakpoints Work in R2018b?

조회 수: 1 (최근 30일)
Dirk Bell
Dirk Bell 2019년 2월 6일
댓글: Dirk Bell 2019년 2월 11일
I set breakponts in the script and they are ignored. The script executes past them. The breakpoints remain set (bright red). I have restarted MATLAB. I have restarted my computer then restarted MATLAB. I have cleared and reset the the breakpoints manually. I tried using the menu breakpoint Clear All and then manually resetting them. No change. I do not 'clear' anything in the script but my own variables. The code is definitely executing right past the breakpoint.
I tried resetting the breakpoints after a save right before executing the script (recommended here for another version). Nope. I read here about similar problems in other versions (like did you 'clear java') - not related to my problem.
  댓글 수: 5
Rik
Rik 2019년 2월 6일
What I meant is if you were using the 'run section' option (either from the lint, or by using ctrl+enter). In my experience that does sometimes cause issues with breakpoints.
Also, your answer is not an answer. You should delete it and repost it as a comment. Now other contributors might think your issue has been solved, since there is an answer.
Dirk Bell
Dirk Bell 2019년 2월 6일
All breakpoints are on lines that are never conditionally executed.
As you suggested I put a breakpoint on the first command in the file. Didnt stop. I put a string right after the breakpointed first command. The string is displayed.
I have also verified I am setting all of the breakpoints in the files I am executing using the 'which' command.
Not using the "run section" option.

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

답변 (1개)

Yair Altman
Yair Altman 2019년 2월 11일
This could happen if your script runs inside a parallel loop (spmd or parfor), or is shaddowed by a binary version (e.g., file.m shaddowed by file.p or file.mex).
In such cases, Matlab uses a compiled version of the code and does use the source code in your script file, therefore never stopping at your breakpoint.
  댓글 수: 1
Dirk Bell
Dirk Bell 2019년 2월 11일
None of these is the case.
A full power down and restart fixes it for a while.

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

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by