buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babu Naidu <>
Subject Re: How to run a java test (Junit) in debug mode
Date Tue, 17 Nov 2009 23:12:23 GMT

I am on buildr 1.3.4 and Jruby 1.3.0 and I have  following code defined for
a project in build file.

      test.using :java_args => "-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8453 -Xms128m
-Xmx256m", :fork => false
      test.compile.with(projects('api'), resources)

It didn't work for as it didn't output that it is listening on a port and
waiting for an IDE to connect to. It just executed my test without stopping.
Any ideas/hints what's going on here?


On Tue, Nov 17, 2009 at 2:44 PM, Rhett Sutphin <>wrote:

> Hi Babu,
> On Nov 17, 2009, at 3:30 PM, Babu Naidu wrote:
>  Hi,
>> I have a junit test that I would like to debug, however I am not able to
>> figure out how to pass java debug options to the JVM that runs junit test
>> or
>> test task. For example, I would like to run the junit test with '-Xdebug
>> -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8453' jvm options
>> and connect my IDE to it for further debugging. I tried setting JAVA_OPTS
>> variable, it didn't work, probably these options weren't propagated to the
>> JVM that ran my test as it didn't stop at a breakpoint in my test class.
>> Thanks
>> Babu
> Check out this section of the docs:
> You want to pass :java_args to test.using.  (Alternatively you could turn
> off forking and use JAVA_OPTS, but I wouldn't recommend that.)
> Rhett

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message