Discussion:
Remote (java) debugging w JCC?
Petrus Hyvönen
2015-05-17 19:58:07 UTC
Permalink
Hi,

I'm trying to find some potential bugs in the java code I've wrapped and
thought about the possibilities to connect a remote debugger to the JVM.

I am no java expert but found that JVM's can be debugged when started with
some jvm arguments. Such as string is for example
"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4242". I have
tried to feed this to the vmargs, but I get an error and think it's because
the initVM splits the input string on commas to separate arguments.

Do you know if there is a way to trick around this "split"?

Does anyone on the list have experience on remote debugging of JCC wrapped
java, if it can work at all?

Many thanks for feedback
/Petrus
--
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00
Petrus Hyvönen
2015-05-17 20:17:33 UTC
Permalink
Hi,

Sometimes writing an email helps you to seek the source..

Yes, it works,

The vmargs parameter takes also a sequence of things, so:

.initVM(vmargs=['-agentlib:jdwp=transport=dt_socket,server=y,address=8000','-Xdebug'])

remote debugging from eclipse to JVM seems to work fine with breakpoints
etc.

Sorry for the noise.. :)
Regards
/Petrus
Post by Petrus Hyvönen
Hi,
I'm trying to find some potential bugs in the java code I've wrapped and
thought about the possibilities to connect a remote debugger to the JVM.
I am no java expert but found that JVM's can be debugged when started with
some jvm arguments. Such as string is for example
"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4242". I have
tried to feed this to the vmargs, but I get an error and think it's because
the initVM splits the input string on commas to separate arguments.
Do you know if there is a way to trick around this "split"?
Does anyone on the list have experience on remote debugging of JCC wrapped
java, if it can work at all?
Many thanks for feedback
/Petrus
--
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00
--
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00
Loading...