Skip to content

Instantly share code, notes, and snippets.

@qurben
Last active February 25, 2019 10:55
Show Gist options
  • Save qurben/173dd44096babfef517d443606e5d7e3 to your computer and use it in GitHub Desktop.
Save qurben/173dd44096babfef517d443606e5d7e3 to your computer and use it in GitHub Desktop.
Debugging Che wsagent

Debugging Che wsagent

  1. Open Che -> Workspaces -> -your workspace- -> Env Variables
  2. Add WSAGENT_DEBUG true
  3. Add WSAGENT_DEBUG_PORT 8000
  4. If the agent should suspend on start add WSAGENT_DEBUG_SUSPEND y
  5. Hit Apply

Obtaining the agent port in Docker

To quickly figure out the ip of the agent container run docker ps in the console and find the line with eclipse-che/workspace... and in that line the debug port is at 0.0.0.0:xxxxxxx->8000/tcp

The host is localhost when using Docker.

Obtaining the agent ip in Kubernetes

Run the following command:

$ kubectl get pod --namespace che -l che.original_name=dockerimage -o custom-columns=NAME:metadata.name,IP:status.podIP

The port is 8000 when using Kubernetes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment