This page explains how to set up remote-debugging of ServiceMix using Eclipse.
Basically, you have to perform the following steps:
- Enable remote debugging in
- Specify a remote-debugging launch configuration
- Start SM and switch to Debug-Perspective
Enable remote debugging in ServiceMix
The following section in
servicemix.bat is the one that matters:
In order to activate it, you need to set the environment variable
For instance in Windows:
Or in Linux:
ServiceMix runs in debugging mode if you can see the following output when running it:
The debugging options can be modified in
servicemix.bat via the
DEFAULT_JAVA_DEBUG_OPTS. The default values are:
Specifying a Remote Debugging Launch Configuration
Specify an Eclipse Remote Java Application debug launch configuration on the project you want to monitor.
Run - Debug
Remote Java Application
- Create a
New Launch Configuration
- Specify a name, the project you want to debug (e.g.
servicemix-wsn2005) and the connection properties.
See http://www.onjava.com/lpt/a/6174 for details.
- Add breakpoints/debug information to the relevant code inside Eclipse.
- Start ServiceMix.
- Start debugging with the previously created launch configuration.
- Switch to debug perspective.
- Exercise the error-causing behaviour.
- Wait for Eclipse to be notified of the breakpoints.