How to save breakpoints automaticaly

1 次查看(过去 30 天)
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