Comment on page
CI Debugger (beta)
Trunk CI Debugger (beta invite required) is available at app.trunk.io. With a sprinkling of code you can enable live debugging of your CI actions enabling real-time diagnosis, troubleshooting, and of course debugging of your otherwise ephemeral CI job.
Similar to any traditional debugger, the Trunk CI Debugger, operates on breakpoints configured through the trunk web app. Each breakpoint is tracked with a unique id and is configured through a set of conditional rules. For example, you can specify that breakpoint 'foo' always triggers when the exit code of its command is non-zero (or failing).
At its most basic - the trunk ci debugger wraps the execution of whatever command you give it. This allows the debugger to break
on_enterbefore running your command and
on_exitafter your command completes. This wrapper connects to the Trunk Service to determine in real time based on the conditional rules whether to trigger a breakpoint or continue execution.
Upon triggering, the execution of your CI run will be paused and the system will attempt to notify someone that a breakpoint has been triggered. In practice, when working with a pull request for example, this can be a Slack notification to the author of the PR, or a posting of a comment to the PR thread on GitHub.
The notification will include a link to connect to the debugging session and provides authenticated users with direct access to the machine that is being held.
Anything! When connected over a debug session, you have live access to the terminal running your CI job; you are connecting to the live instance being used to run your job.
Besides running any normal shell command from the session, the debugger provides a set of command line tooling to assist your debugging session further.
Last modified 4mo ago