Remotely debugging the myrobotlab Java source code

I want to have the facility to debug the myrobotlab Java source code for an instance of myrobotlab that runs on a remote device 

One scenario is to have myrobotlab running on a Raspberry Pi and then debug that instance with the Eclipse IDE running on a separate host (Windows laptop)

I have this working up to a point.

​I have this working now. See here

See video below showing the Eclipise debugger stepping through /src/org/myrobotlab/service/Runtime.java for a myrobotlab instance running on a Raspberry Pi

One challenge that remains is to have this set up be able to debug other myrobotlab Java services outside of /src/org/myrobotlab/service/Runtime.java

 

 

 

 

 

X11 forwarding the Raspberry Pi display

 

 

References:

http://www.raspirecipes.org/archives/218

https://www.ibm.com/developerworks/library/os-eclipse-javadebug/index.h…

 
 
Profiling using JConsole
 

GroG

6 years 6 months ago

Great video Rolf !

As kwatters mentioned, you are debugging the "Agent" and not the mrl instance.

The Agent spawns the mrl instance with a big long command line.  It's easy to see the command line in the console when you start mrl normally.

07:35:39.480 [main] INFO  class org.myrobotlab.service.Agent - in C:\mrl.test spawning -> [C:\Java\jdk1.8.0_101\jre\bin\javaw -Djava.library.path=libraries/native -Djna.library.pat
h=libraries/native -cp C:\mrl.test\myrobotlab.jar;./libraries/jar/jython.jar;./libraries/jar/*;./bin;./build/classes org.myrobotlab.service.Runtime -service log Log cli Cli gui Swi
ngGui python Python -fromAgent agent.20170911.073539319.7004 -id runtime.20170911.073539479.0 ]

So, if you want to debug an instance of mrl use that command line plus your remote debugging parameters.

Woot !

GroG

6 years 6 months ago

So (in my case) - the whole huge gigantitc command line would be ....

java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -Djava.library.path=libraries/native -Djna.library.path=libraries/native -cp C:\mrl.test\myrobotlab.jar;./libraries/jar/jython.jar;./libraries/jar/*;./bin;./build/classes org.myrobotlab.service.Runtime -service log Log cli Cli gui SwingGui python Python -fromAgent agent.20170911.073539319.7004 -id runtime.20170911.073539479.0

everyones will differ slightly, but be available in the console...