現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
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 日
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 >>'
Walter Roberson
2013 年 3 月 25 日
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
Walter Roberson
2013 年 3 月 26 日
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!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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)
