To prevent the MATLAB Editor/Debugger from opening a MATLAB file when encountering a breakpoint, turn off the "Automatically open files when MATLAB reaches a breakpoint" option in Preferences ->Editor/Debugger in MATLAB. Note this cannot be done via the command line.
When this option is selected, MATLAB opens the MATLAB file in the MATLAB Editor/Debugger or Emacs. External text editors are not integrated with MATLAB graphical debugging features. For more information regarding setting up Emacs as an integrated text editor in MATLAB, execute the following on the MATLAB command prompt:
docsearch('emacs as text editor')
Best Answer