Remote Debugging

You can open a remote console to a running task by setting a breakpoint.

To set a breakpoint, run rwx-breakpoint anywhere in your task. It's a binary, so you can run it directly from your run script or from inside another bash script.

When RWX encounters a breakpoint, it will pause execution and make a private SSH connection available to the running task.

tasks:
  - key: demo-breakpoint
    run: |
      echo "hello world" | tee greeting.txt
      rwx-breakpoint
    env:
      SOME_ENV: the value

Once the breakpoint has been hit, use the rwx debug command in the RWX CLI to open a shell.

The UI will show the command to run. It'll look like this:

rwx debug c2ba55ecd392583f4446323156d0e8bd

RWX uses dtach to drop you into a bash shell in the context which the breakpoint was set.

In the above task definition, you can echo $SOME_ENV and cat greeting.txt

When you're done debugging, run exit or press ctrl+d to end your session.

You'll see output in your task logs in the UI indicating that your debugging session has finished.