Remote Debugging
You can open a remote console to a running task by setting a breakpoint.
To set a breakpoint, run mint-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 Mint 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
mint-breakpoint
env:
SOME_ENV: the value
Once the breakpoint has been hit, use the mint debug
command in the Mint CLI to open a shell.
The UI will show the command to run. It'll look like this:
mint debug c2ba55ecd392583f4446323156d0e8bd
Mint uses tmux 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.