Using jdb for debugging

Dear Community,

As I write in another thread I got difficulties in using the VS Code Debugger and in the Eclipse IDE there are some challenges for me too. Has anyone got some expierences to use jdb (JDB - Quick Guide ) as an external console debugger, i.e. for debugging his addon handler class?

Thanks in advance for your short reply and the necessery params to start OH, the karaf konsole and the jdb application.

My first try is to listen on a running JVM, here the start_debug.bat OH script and set a breakpoint in the handleCommand() method of my addon bundle:

java -agentlib:jdwp=transport=dt_shmem,address=jdbconn,server=y,suspend=n JobaTestHandler

The second call would be:

jdb -attach jdbconn

Unfortunately the result of the first call is, that my main class was neiter found nor loadable. Do they expect a main-method or something like that?

Best regards,
Jochen

You should be able to do this all through VSCode btw - I have absolutely no problems debugging my bindings in VSCode (start OH with the debug option, set a breakpoint, compile/copy the jar to addons and launch the VSCode debugger). You must have some other issue preventing that from happening (see the other thread and see if we can work through it)