MATLAB bug when adding new function while on breakpoint?
Afficher commentaires plus anciens
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 needed
Function C is the new function (`edit funcC`) while breakpoint paused in function A
Function B calls for Function C to run
Function 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 A
Move current directory up one folder
Move 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.
2 commentaires
Stephen23
le 5 Juin 2018
Do you use cd anywhere in your code? Or any operations that change the path?
Tyler Warner
le 5 Juin 2018
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!