Stuart’s MATLAB Videos

Watch and Learn

Editing a MATLAB Function While Stopped at a Breakpoint 3

Posted by Stuart McGarrity,

I often will edit code while stopped at a breakpoint. This lets me have all variables available to process and test the new code. However, if you continue execution of the debug session, MATLAB will not know about your edits. You still need to quit debugging to re-run the whole function with the new code.

Features covered in this code-along style video include:

  • Debugging, Code Editing

Follow me (@stuartmcgarrity) if you want to be notified via Twitter when I post.

Play the video in full screen mode for a better viewing experience. 

3 CommentsOldest to Newest

Hi Chang, Do you mean, how can you continue execution of code that has just been edited? A colleague of mine tells me it is not possible in MATLAB and believes it would be a difficult problem to solve. The file would need to be re-parsed and compiled then the new state correctly updated. Do you know of any programming languages that let you do this?
chang hsiung replied on : 3 of 3
thanks, I don't know how to do that either. Somehow I was thinking you will show us how to do that in this video :) Chang