Wiki Markup |
---|
{scrollbar} |
Anchor | ||||
---|---|---|---|---|
|
5. Debugging
...
and Profiling
Debugging
Usually, the easiest way to debug ServiceMix Runtime or any application deployed onto it is to use remote debugging.
Remote debugging can be easily activated by setting the SERVICEMIX_DEBUG
environment variable to TRUE
.
This can be done using the following command on Unix systems:
No Format |
---|
export SERVICEMIX_DEBUG=true
|
On Windows, use the following command
No Format |
---|
set SERVICEMIX_DEBUG=true
|
Then, you can launch ServiceMix runtime using the usual way:
No Format |
---|
bin/servicemix
|
or
No Format |
---|
bin\servicemix.bat
|
Last, inside your IDE, connect to the remote application (the default port to connect to is 5005).
Profiling
YourKit
You need a few steps to be able to profile ServiceMix Runtime using YourKit.
The first one is to edit the etc/config.properties
configuration file and add the following property:
No Format |
---|
org.osgi.framework.bootdelegation=com.yourkit.*
|
Then, set the JAVA_OPTS
environment variable:
No Format |
---|
export JAVA_OPTS='-Xmx512M -agentlib:yjpagent'
|
or, on Windows
No Format |
---|
set JAVA_OPTS='-Xmx512M -agentlib:yjpagent'
|
Run ServiceMix from the console, and you should now be able to connect using YourKit standalone or from your favorite IDE.TODO
Wiki Markup |
---|
{scrollbar} |