Introducing the World’s First CI/CD Live Debugging Tool

Introducing the World’s First CI/CD Live Debugging Tool

3 min read

Today we’re announcing the first-ever solution for live debugging a CI/CD pipeline. You can now place stop/resume breakpoints and inspect live pipelines in the same way that developers debug their applications. It’s the easiest, fastest way to troubleshoot and fix bugs in complex pipelines.

Live debugging is very well known to software developers and is one of the most efficient ways to find and fix bugs in application code. This technique goes hand-in-hand with graphical integrations from an Integrated Development Environment:

Debugging on an IDE

A developer can place breakpoints (the red dots) on the source code, and after running the application, execution will pause at the breakpoints. At this phase the state of the application (e.g. variables and call stack) can be examined to verify the correct working of the source code.

With our latest update, you now have the same amount of power and flexibility when creating a CI/CD pipeline.

Place breakpoints in your pipelines

With Codefresh you can already run your pipelines locally and see them executing on your workstation. This helps a lot when it comes to monitoring a pipeline and allows you to run the pipeline in a fully controlled context (your laptop).

As more customers are adopting Codefresh we wanted to help them debug their pipelines in a more user-friendly manner. While most CI solutions offer just a simple SSH connection to the builder node, we wanted to take pipeline debugging to the next level and allow you to debug your Codefresh pipelines in the same manner that you debug an application: with breakpoints.

When debugging an application, you place breakpoints in one or more positions in the source code, run the application in debug mode and inspect its state when it hits any of the breakpoints.

You can now do the same thing with Codefresh pipelines! First, you need to start a pipeline in debug mode using the toggle switch in the Run dialog:

Run pipeline in debug mode

Now your pipeline runs in debug mode and you place a breakpoint in any pipeline step by clicking on the circle icon at the far right of the step item.

Adding a breakpoint

The pipeline will now stop every time a breakpoint is encountered. When this happens a new “debug” subwindow will become available with a fully interactive command-line shell.

Debug session

In the shell, you can write any unix commands that you already know as such cat, printenv, cd, etc. to see the state of your pipeline.

You can now ensure that:

  1. Code is checked out in the folder you expect it (even more so when you checkout multiple source git repositories).
  2. Secrets and configuration variables are available to the pipeline with their proper values.
  3. Custom environment variables you create with cf_export are visible in the needed pipeline steps.
  4. Intermediate artifacts (such as test results or coverage reports) are created correctly.
  5. Deployment settings (such as kubeconfig) are set up correctly, and so-on.

Once you are done click the “Continue” button and the pipeline will resume its operation. You can place breakpoints in any of the pipeline steps in 3 modes:

  1. Before the step has even started
  2. After the step has finished
  3. (For freestyle steps) override the commands mentioned in the pipeline definition and allow the user to run any commands in the debug window

This means that you are free to do anything in the debug window such as looking at your source code but also running your tests manually, downloading extra data, checking connectivity with external services, and so on.

Debug console

For more details see the documentation page. We are very excited to make debugging pipelines as easy as possible and we believe that this new feature will lower the barrier even further for your CI/CD journey.

If you are an existing Codefresh user, contact us so that we can enable debugging in your account.

Ready to try Codefresh and start creating your own CI/CD pipelines for microservices? Create Your Free Account Today!

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Build your GitOps skills and credibility today with a GitOps Certification.

Get GitOps Certified

Ready to Get Started?
  • safer deployments
  • More frequent deployments
  • resilient deployments