Debugging Matlab is extremely simple:
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.