Remote debugging of URCaps

Hi,

I want to debug remotely my URCaps code from my eclipse IDE by connecting to the JVM running in URSim.

starturcontrol.sh invokes the binary executable URControl. I dont have any option to set the JVM debug parameters.

Can you please let me know if there any other option to mention the JVM debug parameters like β€œ-Xdebug Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999”?

So that I can debug my code.

2 Likes

Hi,

I found the way to set the debug parameters to Simulator JVM.

Here is the step.

  1. Open the file start-ursim.sh present in the directory /home/ur/ursim-current.
  2. Go to the line

HOME=$URSIM_ROOT -Duser.home=$URSIM_ROOT -Dconfig.path=$URSIM_ROOT/.urcontrol -Djava.library.path=/usr/lib/jni -jar bin/*.jar

  1. update it like (where XXXX is a port number)

HOME=$URSIM_ROOT java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=XXXX -Duser.home=$URSIM_ROOT -Dconfig.path=$URSIM_ROOT/.urcontrol -Djava.library.path=/usr/lib/jni -jar bin/*.jar

  1. Save it.

  2. restart the polyscope.

Now, you can connect from eclipse and debug your code.

Thanks,
Sankar

11 Likes

Hi gomathisankar,

  1. update it like (where XXXX is a port number)

HOME=$URSIM_ROOT java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=XXXX -Duser.home=$URSIM_ROOT -Dconfig.path=$URSIM_ROOT/.urcontrol -Djava.library.path=/usr/lib/jni -jar bin/*.jar

a) where I can find the port number?
b) in eclipse IDE where I need to set additional?

Hi,

In eclipse IDE, run the java program in remote debug mode. In the debug mode, you can configure port number (like 9999) and other debug parameters as VM arguments

Please note that same port number to be used in URSIM also.

1 Like

thank you very much. but I have a question if it should be setting in the remote java application ?

On 9/4/2022 15:03,gomathisankar via Universal Robots Forumnotifications@universal-robots.discoursemail.com wrote: