-
Notifications
You must be signed in to change notification settings - Fork 201
Debugging the Runtime
In this scenario you want to debug the runtime (a running integration). There are two ways to do this.
Edit the ReplicationController of the Integration you want to debug
oc edit rc <rc-integration-name>
and add the JAVA_DEBUG
flag
...
spec:
containers:
- env:
- name: LOADER_HOME
value: ${JAVA_DATA_DIR}/syndesis/loader
- name: JAVA_DEBUG
value: "true"
...
You will need need to restart the integration pod, so that the pod starts with JAVA_DEBUG=true
.
At this point you can use
oc port-forward <pod-name> 5005
and you can attach a debugger to localhost:5005 from you favorite IDE.
To update code in a connector you will need to run
man clean install
in the connector project, then rebuild the s2i
image
tools/bin/syndesis build -m s2i -c -f -i
and finally you will need to rebuild your integration (using the syndesis console)
In your syndesis git project use
tools/misc/extract_integration.sh <podname> <myproject>
where podname
is the name of the running pod and myproject
is a directory where it will export the project code. After extraction you can import this project into your IDE. You can start the process by running the Application
class in the project. If your project need a connection to the SampleDB you can port-forward this to your localhost using
oc port-forward <db-pod-name> 5432
You can now simply change code in your connector project and your IDE will pick it up.