liveBook · Manning

Debugging

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

Debugging is the process of locating, diagnosing, and correcting defects in software or operational workflows.

Debugging means finding the source of a problem and applying a fix that addresses its cause. Ask questions, form hypotheses, and test them with evidence. This is especially challenging in a microservices application, where the problem may lie among several interacting processes. section 11.3

Use this sequence as a guide, not a rigid checklist; investigations often loop back through earlier steps.

  • Triage: prioritize problems by their effect on customers and the business. section 11.3.1
  • Gather evidence: inspect logs, error reports, request traces, user reports, crash call stacks, code versions, and information from operational tools. section 11.3.1
  • Mitigate customer impact while investigating. Rolling back to a previous working version can reduce risk. section 11.3.1
  • Isolate and reproduce the problem. Narrow the search area, then run experiments that test plausible causes. If it works locally but fails in deployment, compare the environments, including their variables. section 11.3 section 8.9.10
  • Fix the cause, check that the fix resolves the problem rather than merely hiding it, and reflect on how to prevent a recurrence. section 11.3 section 11.3.1

A failed deployment workflow

A GitHub Actions workflow reports “Permission denied” for index.sh. Start with the workflow history and its error message, then check whether the shell script is marked executable in the Git repository. Deployment failures may also involve missing environment variables or authentication details, so test the process locally where possible before repeating a slow production deployment. section 8.9.10

Table 11.1 Techniques for understanding the behavior of microservices (view table figure)

Technique

Description

Logging

Outputting information about the behavior of our microservices to show what is happening as it’s happening

Error handling

Having a strategy for managing and recovering from errors

Automatic health checks

Configuring Kubernetes to automatically detect problems in our microservices

Observability

Outputting and recording telemetry that we can use to understand the interactions between our microservices

Logging, error handling, automatic health checks, and observability provide different ways to detect problems and understand microservice behavior before and during an investigation. section 11.1

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Provides a flexible sequence from triage through prevention, with evidence gathering, mitigation, isolation, reproduction, and root-cause testing.
Examples
Uses a GitHub Actions permission error involving a shell script and a rollback to a previous working version.
What you can do after
Practice/perform it: prioritize failures, collect evidence, test causes, mitigate customer impact, and verify a fix.
How it connects
Connects debugging to testing, observability, logging, distributed tracing, deployment pipelines, and microservice health.

Also explained in

Compare how 16 books explain debugging →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.