MATLAB: Debugging a callback function


Hi, I am trying to produce a code that plots certain information in a gui figure so that the user can make a decision, based on the plot, which function to execute next. The functions are executed by buttons on the gui figure. As the functions are triggered by callbacks if I try to debug as normal I am not able to access the function. How can I get into the function to find my error?

Best Answer

  • "[...] debug as normal [...]"? Could you provide an example? I would either set
    >> dbstop if error
    or set a breakpoint in the callback function before I fire the callback.
    Here are some links on debugging in Matlab