이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
1 개 추천
Hi,
I was running a program with a dbstop if NAN/inf line.
The program ran and gave results. however, at the bottom where it normally says 'busy' when a program is i progress, it said stopped at debugger. There was no error displayed and the result I got were good.
Should I worry about it?
Thanks
채택된 답변
Walter Roberson
2013년 3월 25일
3 개 추천
You could give the command
dbcont
and see what happened. Or you could give the command
dbstack
to see where it thought it was stopped.
댓글 수: 13
thanks. does the program slow down when I use dbstop, dbcont ....
and should I use dbcont with dbstop?
Walter Roberson
2013년 3월 25일
The program will probably run slower when you use that form of dbstop.
dbcont can be used to resume execution. There is also a menu button to resume execution.
dav
2013년 3월 25일
should I use dbstop with dbcont?
Walter Roberson
2013년 3월 25일
It doesn't matter. You can create breakpoints from the command line with dbstop, or you can create them through menus. The effect is the same. Likewise, if you are stopped at the debugger prompt and you wish to continue, you can use dbcont or you can use the menus to continue.
dbcont will give you an error if you are not stopped at the debugger prompt. If you have just issued a "dbstop" command in preparation for running something, but you are not at the debugger prompt, then do not use dbcont: start the program the normal way.
dav
2013년 3월 25일
thanks. could you please explain why I got results at the end of the program when it said 'stopped at debugger'?
to my understanding if it stops at debugger the program stops there.. am I right?
Walter Roberson
2013년 3월 25일
No, stopped in debugger means the program is paused. You can interact with the program variables and continue running further.
If you stopped in the debugger because of an error caught with "dbstop if error" then it will stop before the error has been sent upwards to containing routines. In such as situation, continuing running might not do you any good. (But "dbstop if caught error" is meaningful and continuing from that situation is useful.)
So that means if the results I get are believable even if it says stopped at debugger, I don't have to worry about it?
the reason why I asked this was:
I ran a large simulation program last night and when I checked it this morning I had gotten the results however it said stopped at debugger at the bottom and the command prompt was 'K >>'
It means you should use the command
dbstack
to find out why it was stopped.
thanks.. can I use this after the program is run?
Thanks again for all the help!
Walter Roberson
2013년 3월 25일
Yes, you can use dbstack any time the program is at the K> prompt.
dav
2013년 3월 26일
I did what you had suggested and got the following.
K>> dbstack
> In fminseasonal at 710
BUT, fminseasonal is not the program I was running. fminseasonal was a program I use before and I used fmincon to do estimation in it.
However, I did not use fmincon in this program. I used lsqlin..
I think it's in matlab memory. Is there a way to clear all saved command before running a new program? I am using clc and clear in my code. but it doesn't seem to clear well.
thanks
dbquit
and keep doing that until you are no longer at the debugger prompt.
The good news is that your newer program likely ended fine.
dav
2013년 3월 26일
thanks Walter.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Debugging and Analysis에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
