Azzera filtri
Azzera filtri

Matlab GUI steals focus at debug breakpoint

2 visualizzazioni (ultimi 30 giorni)
Jonathan Bishop
Jonathan Bishop il 29 Mar 2019
Commentato: Donna Calhoun il 1 Feb 2024
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?

Risposte (1)

Steven Lord
Steven Lord il 29 Mar 2019
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 Commento
Donna Calhoun
Donna Calhoun il 1 Feb 2024
Thank you! I finally found this solution, after continued frustration that the editor was constantly stealing focus at breakpoints.

Accedi per commentare.

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by