how to dynamically pause the matlab into debugging while execution by a Gui?

I have a long non-gui matlab code with different function m-files which do some simulations.
I want to dynamically pause the code from running by going to the debugging mode while execution. How can I write a matlab Gui check box that from the start of the running the gui shows "go to debugging" and "continue" check boxes. As soon as I check "go to debugging" the program should go to debugging mode.
The reason is that I have some global variables and I want to stop the code from the printed results and change that variable, like in debugging mode, and then press continue for rest of execution with the new global variable.
I appreciate your help.

 採用された回答

Rick Rosson
Rick Rosson 2014 年 9 月 1 日
編集済み: Rick Rosson 2014 年 9 月 1 日
Create a callback function for the "go to debugging" checkbox. Inside the callback, include the command
dbstop;
When finished debugging, simply type
dbcont
At the command prompt.

1 件のコメント

Matt J
Matt J 2014 年 9 月 1 日
Also make sure the check box Interruptible property is set to 'off'.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDebugging and Analysis についてさらに検索

タグ

タグが未入力です。

質問済み:

H-H
2014 年 8 月 30 日

コメント済み:

2014 年 9 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by