-
Notifications
You must be signed in to change notification settings - Fork 7
Debugging a stack application
Scott Kurz edited this page Apr 30, 2021
·
2 revisions
-
Push your app in "debug" mode
odo push --debugNote: The default odo debug port 5858 will be used.
-
Setup port forwarding from your cluster to your local workspace
Using odo:
odo debug port-forwardA specific local port can be specified with the
--local-portflagUsing kubectl:
kubectl port-forward <pod_name> 5858:5858 -
Connect a debugger to localhost:5858 (or whatever local port you forwarded to)
-
Add
-Dmaven.failsafe.debugto test command -
Push your app to your cluster
odo push -
Forward the Maven default debug port (5005) from your cluster to your local workspace
kubectl port-forward <pod_name> 5005:5005 -
Run your tests
odo test --show-log -
Connect a debugger to localhost:5005