What about Debugging?

Debugging Matlab is extremely simple:

  1. open the function you want to debug in your Matlab editor
  2. click to the left of the line to set a breakpoint
  3. use the commands from the Matlab editor to control flow of execution

Since Matlab is an interpreted language, debugging when execution is stopped is completely natural.  See the Matlab help files for more information on the matlab debugger.

Debugging Java objects in Matlab is easy in some sense since you can instantiate arbitrary objects and call arbitrary functions.  However, it is in some sense difficult because the Matlab debugger does not step into Java objects. You can, however, start your Java object using a Java debugger which is written in Java from Matlab, allowing you to debug your Java object by using Matlab as a Java interpreter.