MATLAB: Is there a way to play audio/run a script when matlab debugger stops at a breakpoint

audiodebugger breakpoints alertssound

Hi, I would like matlab to play a sound or run a script when the program stops at a breakpoint. I run many copies of matlab simultaneously and it would great to be alerted when a particular script reaches a breakpoint. Does anyone know if this can be done?

Best Answer

Write a small function
function t = notify()
beep();
t = true;
Now, when you set a breakpoint, make it a conditional breakpoint. For example instead of
dbstop at 18
use
dbstop at 18 if notify()