Home > JBoss Fuse > Remote Debug on Fuse Fabric Container

Remote Debug on Fuse Fabric Container

When you create a container in fabric you can specify which options should be passed to the container. This way you can set the amount of memory for instance, but you can also specify that the container should start in debug modus.

The following Fuse CLI command would create a container with a maximum heap size of 256 MB:

container-create-child --jvm-opts "-Xmx256m" root child

In the Hawt.io console you’ll find the “Jvm opts” option under the “Advanced” tab on the container creation page.

Now you can also use this to pass the regular debug commands to a JVM: “-Xdebug -Xrunjdwp:transport=dt_socket,address=5001,server=y,suspend=n”.

The CLI command would then look like this:

container-create-child --jvm-opts "-Xdebug -Xrunjdwp:transport=dt_socket,address=5001,server=y,suspend=n" root child

The suspend=n part means that the JVM won’t wait for a debugger to connect but will startup like usual. If you need to see what happens in the JVM right after it starts you can change this to suspend=y. The JVM will then block until a debugger is connected.

This post is based on my answer to luca.santaniello.81 on the JBoss Developer forums.

Categories: JBoss Fuse Tags: , , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: