Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Usually, the easiest way to debug Karaf or any application deployed onto it is to use remote debugging.
Remote debugging can be easily activated by setting the SERVICEMIXKARAF_DEBUG environment variable to TRUE.

This can be done using the following command on Unix systems:

No Format
export SERVICEMIXKARAF_DEBUG=true

On Windows, use the following command

No Format
set SERVICEMIXKARAF_DEBUG=true

Then, you can launch ServiceMix runtime Karaf using the usual way:

No Format
bin/servicemixkaraf

or

No Format
bin\servicemixkaraf.bat

Last, inside your IDE, connect to the remote application (the default port to connect to is 5005).

...

You need a few steps to be able to profile ServiceMix Runtime Karaf using YourKit.
The first one is to edit the etc/config.properties configuration file and add the following property:

...

No Format
set JAVA_OPTS='-Xmx512M -agentlib:yjpagent'

Run ServiceMix Karaf from the console, and you should now be able to connect using YourKit standalone or from your favorite IDE.

5.1. Troubleshooting, Debugging and Profiling#top

Wiki Markup
{scrollbar}