Debug your CircleCI environments using the Rookout orb
CTO and Co-Founder at Rookout
Our goal at Rookout, the rapid debugging solution, is to help developers debug quickly and effectively, even in places where it would otherwise be hard. Dynamically created staging or testing environments can have a different configuration each time they are created, which leads to unpredictable results and bugs that are impossible to reproduce. Debugging such environments is sometimes just as hard and frustrating as debugging in production. CircleCI orbs make it easy to integrate with Rookout - a solution that makes debugging in production, staging, or test environments just as easy as debugging on your local machine.
With Rookout, you can keep your CI/CD flow fresh and stable, allowing your team to keep pushing features and fixes without fear.
Rookout basics
As you run your CircleCI workflow, Rookout stands by and awaits your debugging instructions. Think of Rookout as a web-based IDE attached to your code as it is running in debug mode.
When you add Rookout breakpoints to your code, your code doesn’t break. Instead, it will keep running as usual. As it reaches the breakpoint, debug data will asynchronously be sent to the Rookout IDE. This allows you to debug your code without interrupting your CI/CD flow.
CircleCI setup
Once you’ve created a Rookout Project and imported your source code, retrieve your ROOKOUT_TOKEN
from the admin settings page. Then, set your ROOKOUT_TOKEN
as an environment variable in your CircleCI project. Using the Rookout orb is a simple as importing it in your .circleci/config.yml
file:
orbs:
rookout-node: circleci/rookout-node@0.0.2
And calling the rookout-node/run_script
command:
jobs:
my_job:
docker:
- image: circleci/node:10
steps:
- rookout-node/run_script:
users_script: %YOUR_NODE_COMMAND%
Now you can set a Rookout breakpoint at the step you wish to debug, just as if you were debugging it locally in your own IDE. Once you trigger your build again, debug messages will be fetched and sent to your Rookout IDE:
In the example above, you can see how setting a breakpoint and debugging your code is just as easy as debugging local code on your local machine.
Wrapping up
We’re delighted to be a part of CircleCI’s Technology Partner Program, helping developers debug their own build and test steps, and making the development cycle faster and more efficient.
Liran Haimovitch is the CTO and Co-Founder of Rookout. He’s an advocate of modern software methodologies and his secret passion is to understand how software actually works. You can follow him @Liran_Last.