フィルターのクリア

Matlab GUI steals focus at debug breakpoint

2 ビュー (過去 30 日間)
Jonathan Bishop
Jonathan Bishop 2019 年 3 月 29 日
コメント済み: Donna Calhoun 2024 年 2 月 1 日
Despite the profusion of questions about figures taking the focus, I've found that the Matlab GUI debug also does this, when it reaches a breakpoint. I'll start the debugger on some code that may take 2-5 minutes to reach breakpoint, then work on something else. Whatever I'm typing then goes seamlessly and straight into the file I'm debugging when the breakpoint is reached. It's especially confusing since I've got the two screens and all going, so I'm typing on one screen and the matlab GUI is still on the other screen. So when the focus moves, nothing on either screen actually moves to alert my eye. Things happen so quickly, that sometimes I literally cannot tell what has just happened, and then all of a sudden I've broken the code that doesn't work even worsely, until later I find a few random characters, saved! I have no idea how, and occasionally in quite other files than the one I'm debugging! but that are higher or lower in the callstack somehow. A challenging variant is that if I do catch the mistyped character, get rid of it, and save the file, that ends the debug session and I have to start all over again! in VS for example, you can edit a file while continuing a debug session on the original file, a huge advantage. It's amazing how it spins out of control so easily. How do I make this stop?

回答 (1 件)

Steven Lord
Steven Lord 2019 年 3 月 29 日
Do you have the "Automatically open files when MATLAB reaches a breakpoint" preference in the Editor/Debugger section of the Preferences for MATLAB set? (Home tab of the Toolstrip, Preferences button in the Environment section, expand MATLAB if necessary, select Editor/Debugger.)
  1 件のコメント
Donna Calhoun
Donna Calhoun 2024 年 2 月 1 日
Thank you! I finally found this solution, after continued frustration that the editor was constantly stealing focus at breakpoints.

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

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by