How do I debug my Java source code that I am calling from the MATLAB environment?
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am calling Java classes in my MATLAB files and at the MATLAB command prompt using the MATLAB Java Interface. I would like to debug into the Java source code from my Java IDE (such as Eclipse or Intellij) as it is called from MATLAB.
Risposta accettata
MathWorks Support Team
il 25 Lug 2013
In order to debug Java code being called from the MATLAB environment, use the following steps:
1. Relaunch MATLAB using the -jdb flag from a command prompt. For example:
matlab -jdb
(by default this flag will enable debugging support in the VM on port 4444)
2. You can either launch a Java debugger from a Java IDE such as Eclipse and Intellij, or call jdb from the system command prompt. MATLAB displays the message “JVM is being started with debugging enabled” and provides the appropriate information. For example:
jdb -connect com.sun.jdi.SocketAttach:port=4444
3. After attaching the debugger you will be able to set breakpoints as you normally would.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!