My program takes a bit of time to load in variables and files, so I prefer to set a breakpoint and test run functions by pressing F9 (run line of code) while highlighting the function in the script.
Here's what happened:
Function A has the breakpoint (program paused execution)Function B has the code I want to change/test by plotting data and changing it as neededFunction C is the new function (`edit funcC`) while breakpoint paused in function AFunction B calls for Function C to runFunction B & C successfully saved to disk (no changes made to Function A)Function B called (highlighted and pressed F9) while on breakpoint in Function A
I subsequently got an error stating that Function C does not exist.
My Solution:
Terminate the process for Function AMove current directory up one folderMove back into directory with functions and rerun program
Worked fine after that.
It's a minor inconvenience with an easy solution, but could this be a bug and can it be fixed soon to improve MATLAB? I am using R2017a commercial edition.
Best Answer