Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Avoid refocusing editor to current line after error when debugging?

1 vue (au cours des 30 derniers jours)
Evan
Evan le 8 Juin 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
When debugging/building a functions/scripts, I'll often run blocks of edited code while execution is paused. Frequently, this results in errors. Because I use dbstop error, this will pause the execution a second time. So I inspect the error and resume execution (bringing me back to the original location in the stack). What happens then is that the editor refocuses/scrolls to the current paused location in code, which is often hundreds of lines from where I'm actually working. Is there any way to disable this? It's physically disorienting.

Réponses (1)

Walter Roberson
Walter Roberson le 8 Juin 2018
Preferences -> Editor/Debugger
and turn off "Automatically open files when MATLAB reaches a breakpoint"
  1 commentaire
Evan
Evan le 9 Juin 2018
That doesn't seem to change the behavior for this particular case. Once the file is open, it refocuses to the line at which execution is paused, even after turning off "Automatically open files when MATLAB reaches a breakpoint."

Produits


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by