Parametrizing forked VMs with arguments (ex.: jetty-run)

4,669 views
Skip to first unread message

Maxime Lévesque

unread,
Jul 11, 2010, 11:56:45 AM7/11/10
to simple-build-tool

I would like to remotely debug code that is running in Jetty,
I am assuming that the SBT task : jetty-run starts a VM,
if I could just pass VM arguments to this VM, like :

-Xdebug -
Xrunjdwp:transport=dt_socket,address=127.0.0.1:60433,suspend=y,server=n

I would probably be all set.

A lot of SBT tasks are forking VMs, so it seems like the ability to
parametrize these VM
instances would be a usefull feature.

Can it be done ?

Thanks

Mark Harrah

unread,
Jul 11, 2010, 12:03:38 PM7/11/10
to simple-b...@googlegroups.com
On Sunday 11 July 2010, Maxime Lévesque wrote:
>
> I would like to remotely debug code that is running in Jetty,
> I am assuming that the SBT task : jetty-run starts a VM,
> if I could just pass VM arguments to this VM, like :

jetty-run does not start a new VM. You would need to specify the jvm arguments in your sbt startup script.

> -Xdebug -
> Xrunjdwp:transport=dt_socket,address=127.0.0.1:60433,suspend=y,server=n
>
> I would probably be all set.
>
> A lot of SBT tasks are forking VMs, so it seems like the ability to
> parametrize these VM
> instances would be a usefull feature.

Only 'run' can be configured to fork a VM and you can specify the options. If you have Java code, 'javac' might be forked if one cannot be run in the same vm. Other than these, nothing else is forked.

-Mark

jprudent

unread,
Jul 22, 2010, 12:19:57 AM7/22/10
to simple-build-tool
Hi!
You can run sbt with -Xdebug -
Xrunjdwp:transport=dt_socket,server=y,address=8765
Then connect sbt in eclipse with remote debug
Then, put some breakpoints
Then launch jetty-run

On 11 juil, 22:56, Maxime Lévesque <maxime.leves...@gmail.com> wrote:
>  I would like to remotelydebugcode that is running inJetty,
Reply all
Reply to author
Forward
0 new messages