How to save breakpoints automaticaly

조회 수: 2 (최근 30일)
Dmitry Borovoy
Dmitry Borovoy 2011년 8월 29일
Previous versions of Matlab saved breakpoints automaticaly. Now after each run all breakpoints are just disappear and I have to put them again. It's really annoying. Is there any settings to fix such feature(or bug)? I know about functions dbstop and dbstatus but it's wrong to use code when there are IDE. I must have opportunity to set breakpoints by mouse without additional movements

채택된 답변

Dmitry Borovoy
Dmitry Borovoy 2011년 8월 31일
Ёмае. I understood my fail. I usually write in all my scripts 'clear all' instead 'clear varaibles'. And I just realized that this statement clears break points too. I'm moron. Thanks to this post http://www.mathworks.com/matlabcentral/answers/6007-breakpoints-unpredictable-in-r2011a

추가 답변 (4개)

Walter Roberson
Walter Roberson 2011년 8월 29일
When you say "after each run", do you mean that they disappear when you quit MATLAB, or that they disappear after you exit the debugger?
I have never had a version of MATLAB that saved breakpoints between sessions -- though I did once advise someone in CSSM how to code a breakpoint save and restore routine.

Dmitry Borovoy
Dmitry Borovoy 2011년 8월 29일
I mean that they disappear after I stop debugger. Well it's really strange because all IDE that I know (f.e. VisualStudio etc.) save breakpoints
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 8월 30일
Which version are you using?
There have been some reports with regards to R2011a paying attention to breakpoints only irregularly (especially on Mac), and there have been some for reports for R2010b (I think it was) about breakpoints not being settable (especially on Windows 7)
Breakpoints are not settable in older versions unless the file is writable... though there must be some provision for installed library routines as breakpoints could be set in those?
The 2010b Windows 7 problems I have not seen an explanation of yet; the obvious possibilities have been checked out with no configuration solutions found yet (that have been reported.) I think a person or two managed to get around it by running as administrator.

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


Daniel Shub
Daniel Shub 2011년 8월 30일
I am not sure why your breakpoints are disappearing, but you should be able to write a timer callback function that uses dbstatus to get the break points and then dbstop to add them back.

Dmitry Borovoy
Dmitry Borovoy 2011년 8월 31일
I have Win7 Pro, Matlab 2011a, 2010a, 2010b, 2009b (they all had such problems). Also tested it on WinXP SP3. I have admins privileges, but I launched it as administrator and nothing. Well I don't want write any code, there must be some logical solution of my problem I remember that version 6.5 didn't have such problems

카테고리

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