Is it possible to add a hook or set a configuration variable such that the .m file I am debugging remains in edit mode when debugging starts. I don't want to switch out of read-only mode to interactively debug and code.

It seems this behavior is relatively new since older versions did not enforce this.


I had the same question. After reading through the matlab-shell-gud.el and playing around with code, I got the following to work:

    (add-hook 'matlab-shell-prompt-appears-hook
              (lambda ()
                (global-matlab-shell-gud-minor-mode 0)))

Now it starts in edit mode and C-x C-q switches into debug mode.

  • I reindented your code. You likely pasted code that used TAB chars for indenting. Use M-x untabify to replace TABs with spaces before pasting here, or readjust after pasting.
    – Drew
    Mar 28 '21 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.