For Matlab R14+ you can start Matlab as
Alternatively again you can start matlab with some command line flags.
And then you can connect to Matlab over port 4444 with any JPDA-supporting debugger (NetBeans, Sun Studio, Eclipse, etc.).
For lower versions of Matlab the following advice may help. First read the below information on the java.opts file.
http://www.mathworks.com/support/solutions/data/28748.shtml
Then add the following parameters to the java.opts file
or, alternatively, if you are on Windows system, you could use
ATTENTION!!! Each option must be on a separate line in the java.opts file, otherwise Java will not initialize properly.
Alternatively again you can start matlab with some command line flags.
matlab -jdb
And then you can connect to Matlab over port 4444 with any JPDA-supporting debugger (NetBeans, Sun Studio, Eclipse, etc.).
For lower versions of Matlab the following advice may help. First read the below information on the java.opts file.
http://www.mathworks.com/support/solutions/data/28748.shtml
Then add the following parameters to the java.opts file
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n
or, alternatively, if you are on Windows system, you could use
-Xdebug -Xrunjdwp:transport=dt_shmem,address=matlab,server=y,suspend=n
ATTENTION!!! Each option must be on a separate line in the java.opts file, otherwise Java will not initialize properly.