<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Richard Kabi</title>
    <description>The latest articles on DEV Community by Richard Kabi (@nebulascout).</description>
    <link>https://dev.to/nebulascout</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4192203%2Fa4a16869-d1e8-4c99-bc0a-8360f7ff27d6.jpg</url>
      <title>DEV Community: Richard Kabi</title>
      <link>https://dev.to/nebulascout</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nebulascout"/>
    <language>en</language>
    <item>
      <title>Debugging Go Applications with Visual Studio Code</title>
      <dc:creator>Richard Kabi</dc:creator>
      <pubDate>Sun, 22 Nov 2026 14:06:54 +0000</pubDate>
      <link>https://dev.to/nebulascout/debugging-go-applications-with-visual-studio-code-3n0h</link>
      <guid>https://dev.to/nebulascout/debugging-go-applications-with-visual-studio-code-3n0h</guid>
      <description>&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;Debugging is an essential part of software development. It helps developers understand how an application behaves during execution, identify unexpected behaviour, trace errors, and fix bugs.&lt;/p&gt;

&lt;p&gt;Go provides several debugging capabilities through &lt;strong&gt;Delve (dlv)&lt;/strong&gt;, a debugger specifically designed for Go applications. Visual Studio Code integrates with Delve through the official Go extension, providing a graphical interface for debugging Go programs.&lt;/p&gt;

&lt;p&gt;This document serves as a practical reference for debugging Go applications using VS Code and Delve.&lt;/p&gt;

&lt;h3&gt;
  
  
  What we will cover
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Understanding Delve and its role in Go debugging.&lt;/li&gt;
&lt;li&gt;Setting up the Go debugging environment in VS Code.&lt;/li&gt;
&lt;li&gt;Creating and configuring &lt;code&gt;launch.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Setting and managing breakpoints.&lt;/li&gt;
&lt;li&gt;Inspecting variables and expressions.&lt;/li&gt;
&lt;li&gt;Stepping through application execution.&lt;/li&gt;
&lt;li&gt;Using the Delve command-line interface.&lt;/li&gt;
&lt;li&gt;Debugging tests and existing processes.&lt;/li&gt;
&lt;li&gt;Common debugging issues and troubleshooting.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Understanding Delve
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Delve (dlv)&lt;/strong&gt; is a debugger designed specifically for the Go programming language.&lt;/p&gt;

&lt;p&gt;It allows developers to pause program execution, inspect variables, examine function calls, investigate go-routines, and step through code to understand what is happening internally.&lt;/p&gt;

&lt;p&gt;Unlike relying entirely on print statements (&lt;code&gt;fmt.Println&lt;/code&gt;) or application logs, a debugger allows you to inspect the application's state at a particular point during execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  What can Delve do?
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Breakpoints&lt;/td&gt;
&lt;td&gt;Pause execution at specific lines or functions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Variable inspection&lt;/td&gt;
&lt;td&gt;Examine the values of variables during execution.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Step execution&lt;/td&gt;
&lt;td&gt;Execute code one statement at a time.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Call stack inspection&lt;/td&gt;
&lt;td&gt;Understand the sequence of function calls.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go-routine inspection&lt;/td&gt;
&lt;td&gt;Examine concurrent execution in Go applications.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression evaluation&lt;/td&gt;
&lt;td&gt;Evaluate expressions while the program is paused.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conditional breakpoints&lt;/td&gt;
&lt;td&gt;Pause execution only when a specified condition is met.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Why Delve?
&lt;/h3&gt;

&lt;p&gt;Go applications use go-routines extensively for concurrency. Delve understands Go's runtime and provides debugging capabilities suited to Go's execution model.&lt;/p&gt;

&lt;p&gt;VS Code uses Delve behind the scenes to provide its debugging functionality.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Setting Up the Debugging Environment
&lt;/h2&gt;

&lt;p&gt;Before debugging Go applications in VS Code, ensure the following are installed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go programming language.&lt;/li&gt;
&lt;li&gt;Visual Studio Code.&lt;/li&gt;
&lt;li&gt;The official Go extension for VS Code.&lt;/li&gt;
&lt;li&gt;Delve debugger.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1: Install the Go extension
&lt;/h3&gt;

&lt;p&gt;Open VS Code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to Extensions.&lt;/li&gt;
&lt;li&gt;Search for &lt;code&gt;Go&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Install the official extension published by the Go team.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The extension provides Go language support, formatting, testing, code navigation, and debugging integration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Install or update Delve
&lt;/h3&gt;

&lt;p&gt;You can install Delve manually using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go install github.com/go-delve/delve/cmd/dlv@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ensure your Go binary directory is included in your system's &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Check whether Delve is installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlv version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also install or update Delve directly from VS Code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Command Palette (&lt;code&gt;Ctrl + Shift + P&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Search for &lt;code&gt;Go: Install/Update Tools&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;dlv&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Install or update it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The Go extension can also prompt you to install or update Delve when you first start a debugging session.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Starting Your First Debugging Session
&lt;/h2&gt;

&lt;p&gt;VS Code provides a built-in debugging interface that allows you to debug Go applications without manually interacting with the Delve terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Open your Go project
&lt;/h3&gt;

&lt;p&gt;Open the project directory in VS Code.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-go-project/
├── go.mod
├── main.go
├── handlers/
│   └── handler.go
└── services/
    └── user.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Open the Run and Debug panel
&lt;/h3&gt;

&lt;p&gt;You can access the debugging interface by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Selecting Run and Debug from the Activity Bar.&lt;/li&gt;
&lt;li&gt;Using the keyboard shortcut &lt;code&gt;F5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Opening the Command Palette and searching for debugging commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: Create a debugging configuration
&lt;/h3&gt;

&lt;p&gt;If your project does not have a debugging configuration, VS Code can generate one automatically.&lt;/p&gt;

&lt;p&gt;Select:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Run and Debug → create a launch.json file → Go&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This creates a &lt;code&gt;.vscode&lt;/code&gt; directory containing a &lt;code&gt;launch.json&lt;/code&gt; file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Start debugging
&lt;/h3&gt;

&lt;p&gt;Open the Go file or package you want to debug.&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;F5&lt;/code&gt; to start the debugging session.&lt;/p&gt;

&lt;p&gt;VS Code will use Delve to build and launch the application.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Understanding launch.json
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;launch.json&lt;/code&gt; file defines how VS Code should start or attach to a Go application during debugging.&lt;/p&gt;

&lt;p&gt;It is normally located at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.vscode/launch.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A basic configuration looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0.2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"configurations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Launch Go Application"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"go"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"request"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"launch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"debug"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"program"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"${workspaceFolder}"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Understanding the configuration
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Name displayed in the debugging configuration dropdown.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Specifies the debugger extension. For Go, use &lt;code&gt;go&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;request&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Determines whether to launch or attach to a process.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Determines how the application should be debugged.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;program&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Specifies the Go file or package directory to debug.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;args&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Supplies command-line arguments to the application.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;env&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defines environment variables for the application.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cwd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sets the application's working directory.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;buildFlags&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Passes additional flags to the Go compiler.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Common debugging modes
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;debug&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Builds and debugs a Go application.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;test&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Runs and debugs Go tests.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;exec&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Debugs an already compiled binary.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;auto&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Automatically chooses between debugging an application and a test.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Example: Debugging with environment variables
&lt;/h3&gt;

&lt;p&gt;Some applications require environment variables to run correctly.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0.2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"configurations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Launch Application"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"go"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"request"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"launch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"debug"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"program"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"${workspaceFolder}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nl"&gt;"APP_ENV"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"development"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="nl"&gt;"PORT"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"8080"&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"cwd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"${workspaceFolder}"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration starts the application with the specified environment variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Avoid committing real credentials, passwords, API keys, or other secrets to &lt;code&gt;launch.json&lt;/code&gt;. Use environment files or your organization's approved secrets management approach.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Working with Breakpoints
&lt;/h2&gt;

&lt;p&gt;A breakpoint tells the debugger where to pause program execution.&lt;/p&gt;

&lt;p&gt;Instead of allowing an application to execute all its instructions, you can pause it at a specific point and inspect what is happening.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting a breakpoint
&lt;/h3&gt;

&lt;p&gt;In VS Code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Go source file.&lt;/li&gt;
&lt;li&gt;Locate the line you want to investigate.&lt;/li&gt;
&lt;li&gt;Click in the editor's left margin beside the line number.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A red dot indicates that a breakpoint has been created.&lt;/p&gt;

&lt;p&gt;You can also use &lt;code&gt;F9&lt;/code&gt; to toggle a breakpoint on the current line.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of breakpoints
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Standard breakpoints&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pause execution whenever the application reaches a particular line.&lt;/p&gt;

&lt;p&gt;Useful when investigating unexpected behaviour in a function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Conditional breakpoints&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pause execution only when a specified condition evaluates to true.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;userID&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is useful when a function is called repeatedly but you only want to investigate a particular case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Function breakpoints&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pause execution whenever a particular function is called.&lt;/p&gt;

&lt;p&gt;Useful when you know which function is responsible for unexpected behaviour but do not know exactly where to place a breakpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Logpoints&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Log information to the Debug Console without pausing program execution.&lt;/p&gt;

&lt;p&gt;Useful when you want to inspect values without interrupting the application's execution.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Stepping Through Code
&lt;/h2&gt;

&lt;p&gt;Once execution reaches a breakpoint, you can control how the application continues.&lt;/p&gt;

&lt;p&gt;VS Code provides several execution controls.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Shortcut&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Continue&lt;/td&gt;
&lt;td&gt;F5&lt;/td&gt;
&lt;td&gt;Resume execution until the next breakpoint.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Step Over&lt;/td&gt;
&lt;td&gt;F10&lt;/td&gt;
&lt;td&gt;Execute the current line and move to the next line without entering called functions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Step Into&lt;/td&gt;
&lt;td&gt;F11&lt;/td&gt;
&lt;td&gt;Enter the function being called.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Step Out&lt;/td&gt;
&lt;td&gt;Shift + F11&lt;/td&gt;
&lt;td&gt;Finish executing the current function and return to its caller.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Restart&lt;/td&gt;
&lt;td&gt;Ctrl + Shift + F5&lt;/td&gt;
&lt;td&gt;Restart the debugging session.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stop&lt;/td&gt;
&lt;td&gt;Shift + F5&lt;/td&gt;
&lt;td&gt;Stop the debugging session.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Understanding the difference
&lt;/h3&gt;

&lt;p&gt;Consider the following example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;calculateTotal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;calculateTotal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose execution is paused at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;calculateTotal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step Over:&lt;/strong&gt; Executes &lt;code&gt;calculateTotal()&lt;/code&gt; and moves to the next statement in &lt;code&gt;main()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step Into:&lt;/strong&gt; Enters &lt;code&gt;calculateTotal()&lt;/code&gt; so you can inspect its execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step Out:&lt;/strong&gt; Finishes the current function and returns to the calling function.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These controls are particularly useful when tracing execution across multiple functions.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Inspecting Variables and Expressions
&lt;/h2&gt;

&lt;p&gt;One of the most useful debugging capabilities is being able to inspect variables while an application is paused.&lt;/p&gt;

&lt;p&gt;VS Code provides several ways to do this.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.1 Hover over variables
&lt;/h3&gt;

&lt;p&gt;While debugging, hover your mouse over a variable in the source code.&lt;/p&gt;

&lt;p&gt;VS Code displays its current value.&lt;/p&gt;

&lt;p&gt;This is useful when you want to quickly inspect a variable without opening another panel.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.2 Variables panel
&lt;/h3&gt;

&lt;p&gt;The Variables section in the Run and Debug panel displays:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local variables.&lt;/li&gt;
&lt;li&gt;Function arguments.&lt;/li&gt;
&lt;li&gt;Other available variables depending on the selected stack frame and debugger configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can expand objects and structures to inspect their individual fields.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.3 Debug Console
&lt;/h3&gt;

&lt;p&gt;The Debug Console allows you to evaluate expressions while the application is paused.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;ID&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Path&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also inspect more complicated expressions supported by Delve.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.4 Watch expressions
&lt;/h3&gt;

&lt;p&gt;The Watch section allows you to monitor specific variables or expressions.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;ID&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The debugger automatically evaluates these expressions as execution pauses and the selected stack frame changes.&lt;/p&gt;

&lt;p&gt;This is useful when investigating variables whose values change throughout execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.5 Inline values
&lt;/h3&gt;

&lt;p&gt;VS Code can display variable values directly in the editor while debugging.&lt;/p&gt;

&lt;p&gt;You can enable this through your VS Code settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"debug.inlineValues"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  9. Using Delve from the Terminal
&lt;/h2&gt;

&lt;p&gt;Although VS Code provides a graphical debugging interface, Delve can also be used directly from the terminal.&lt;/p&gt;

&lt;p&gt;This is particularly useful when debugging applications in environments where VS Code is unavailable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Start a debugging session
&lt;/h3&gt;

&lt;p&gt;Navigate to the Go package directory and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlv debug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This compiles the current package and starts a debugging session.&lt;/p&gt;

&lt;p&gt;You should see the Delve prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(dlv)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The program is loaded but has not necessarily started executing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Common Delve commands
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;help&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Displays available debugger commands.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;continue&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Resumes program execution.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;break main.main&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sets a breakpoint at a function.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;break main.go:25&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sets a breakpoint at a specific line.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;breakpoints&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lists existing breakpoints.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;clear 1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Removes breakpoint number 1.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;next&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Executes the next statement without entering functions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;step&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Steps into a function.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;stepout&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Steps out of the current function.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;print variable&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Displays a variable's value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;locals&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Displays local variables.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;args&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Displays function arguments.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;stack&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Displays the current call stack.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;goroutines&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lists available goroutines.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;goroutine 1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Switches to goroutine 1.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;quit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exits the debugging session.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Example debugging session
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlv debug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the Delve console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(dlv) break main.main
(dlv) continue
(dlv) next
(dlv) print variable
(dlv) stack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This workflow allows you to start an application, pause execution, inspect variables, and investigate the call stack.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Debugging Go Tests
&lt;/h2&gt;

&lt;p&gt;Delve can also be used to debug Go tests.&lt;/p&gt;

&lt;p&gt;This is particularly useful when a test fails unexpectedly and you need to understand why.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using VS Code
&lt;/h3&gt;

&lt;p&gt;Create a test debugging configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Debug Go Tests"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"go"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"request"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"launch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"program"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"${workspaceFolder}"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also open a test file and start debugging using &lt;code&gt;F5&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using the terminal
&lt;/h3&gt;

&lt;p&gt;To debug tests in the current package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlv &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To run a specific test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlv &lt;span class="nb"&gt;test&lt;/span&gt; -- -test.run TestMyFunction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows you to investigate test execution using breakpoints and variable inspection.&lt;/p&gt;




&lt;h2&gt;
  
  
  11. Debugging an Existing Go Process
&lt;/h2&gt;

&lt;p&gt;Sometimes an application is already running, and you want to investigate it without starting another instance.&lt;/p&gt;

&lt;p&gt;VS Code supports attaching to an existing process.&lt;/p&gt;

&lt;p&gt;A basic local attach configuration looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Attach to Go Process"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"go"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"request"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"attach"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"local"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"processId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the debugging session starts, VS Code allows you to select a running process.&lt;/p&gt;

&lt;p&gt;Alternatively, you can specify a known process ID (PID).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Attaching to an existing process has platform and permission requirements. The target binary must also contain suitable debugging information.&lt;/p&gt;




&lt;h2&gt;
  
  
  12. Common Debugging Issues
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;Possible solution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Delve is not installed&lt;/td&gt;
&lt;td&gt;Install or update it using &lt;code&gt;Go: Install/Update Tools&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VS Code cannot find &lt;code&gt;dlv&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Check that the Go binary directory is included in &lt;code&gt;PATH&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Breakpoint is not being hit&lt;/td&gt;
&lt;td&gt;Confirm that the correct source file and package are being executed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Variables cannot be inspected properly&lt;/td&gt;
&lt;td&gt;Check compiler optimizations and the selected stack frame.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Application exits immediately&lt;/td&gt;
&lt;td&gt;Check the application entry point, configuration and startup errors.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Environment variables are missing&lt;/td&gt;
&lt;td&gt;Check the &lt;code&gt;env&lt;/code&gt; and &lt;code&gt;envFile&lt;/code&gt; settings in &lt;code&gt;launch.json&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debugging a compiled binary behaves unexpectedly&lt;/td&gt;
&lt;td&gt;Rebuild with optimizations and inlining disabled.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Disabling compiler optimizations
&lt;/h3&gt;

&lt;p&gt;Compiler optimizations and function inlining can sometimes make debugging more difficult.&lt;/p&gt;

&lt;p&gt;When debugging an existing binary, build it using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go build -gcflags=all=&lt;span class="s2"&gt;"-N -l"&lt;/span&gt; -o app .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-N&lt;/code&gt; disables optimizations.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-l&lt;/code&gt; disables inlining.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This can make variable inspection and stepping through code more predictable.&lt;/p&gt;

&lt;p&gt;Note that these flags are primarily useful for debugging builds, not normal production builds.&lt;/p&gt;




&lt;h2&gt;
  
  
  13. Recommended Debugging Workflow
&lt;/h2&gt;

&lt;p&gt;When investigating a bug in a Go application, the following workflow provides a useful starting point.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Reproduce the problem:&lt;/strong&gt; Understand what action or input triggers the unexpected behaviour.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify the relevant code:&lt;/strong&gt; Locate the function, handler, or package responsible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set breakpoints:&lt;/strong&gt; Place breakpoints at relevant execution points.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start debugging:&lt;/strong&gt; Launch the application using VS Code and Delve.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inspect variables:&lt;/strong&gt; Check arguments, local variables, structures and expressions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step through execution:&lt;/strong&gt; Use Step Over, Step Into and Step Out to understand the execution flow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify the root cause:&lt;/strong&gt; Determine where the actual behaviour differs from what is expected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement a fix:&lt;/strong&gt; Correct the underlying issue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify the fix:&lt;/strong&gt; Run the application and relevant tests again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove unnecessary breakpoints:&lt;/strong&gt; Keep the debugging configuration clean.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  14. Important Things to Remember
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Delve is the primary debugger used by the official Go extension in VS Code.&lt;/li&gt;
&lt;li&gt;Breakpoints allow you to pause execution at specific locations.&lt;/li&gt;
&lt;li&gt;The Debug Console is useful for inspecting variables and evaluating expressions.&lt;/li&gt;
&lt;li&gt;Step Into helps investigate function calls, while Step Over executes them without entering.&lt;/li&gt;
&lt;li&gt;The Call Stack helps trace how execution reached the current location.&lt;/li&gt;
&lt;li&gt;The Goroutines view is particularly useful when investigating concurrent Go applications.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;launch.json&lt;/code&gt; allows you to maintain reusable debugging configurations.&lt;/li&gt;
&lt;li&gt;Debugging and testing go hand in hand. Always verify fixes with relevant tests.&lt;/li&gt;
&lt;li&gt;Debugging configurations should not expose application secrets.&lt;/li&gt;
&lt;li&gt;Debugging builds should be kept separate from production builds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A useful principle:&lt;/strong&gt; You do not need to memorize every debugger command or configuration option. Understand what the debugger can do, know where to find the relevant settings, and refer to the documentation when necessary.&lt;/p&gt;




&lt;h2&gt;
  
  
  15. Further Reading and References
&lt;/h2&gt;

&lt;p&gt;The following resources were used when preparing this reference guide:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/campoy/go-tooling-workshop/blob/master/3-dynamic-analysis/1-debugging/1-delve.md" rel="noopener noreferrer"&gt;Debugging Go Programs with Delve – Campoy's Go Tooling Workshop&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/golang/vscode-go/blob/master/docs/debugging.md" rel="noopener noreferrer"&gt;Debugging – Go Extension for Visual Studio Code&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/debugging-go-code-with-visual-studio-code" rel="noopener noreferrer"&gt;How To Debug Go Code with Visual Studio Code – DigitalOcean&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/go-delve/delve" rel="noopener noreferrer"&gt;Delve Debugger – Official Repository&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://code.visualstudio.com/docs/debugtest/debugging" rel="noopener noreferrer"&gt;Visual Studio Code – Debugging Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Documentation note:&lt;/strong&gt; Debugger features and configuration options can change between versions. Consult the official Go extension and Delve documentation when troubleshooting version-specific behaviour.&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>vscode</category>
      <category>go</category>
      <category>devops</category>
    </item>
    <item>
      <title>How DNS Works: From yahoo.com to an IP Address</title>
      <dc:creator>Richard Kabi</dc:creator>
      <pubDate>Tue, 27 Oct 2026 07:16:57 +0000</pubDate>
      <link>https://dev.to/nebulascout/how-dns-works-from-yahoocom-to-an-ip-address-5cp6</link>
      <guid>https://dev.to/nebulascout/how-dns-works-from-yahoocom-to-an-ip-address-5cp6</guid>
      <description>&lt;p&gt;Every time we open a website, we usually type a domain name into our browser rather than an IP address. For example, we type &lt;code&gt;yahoo.com&lt;/code&gt; instead of remembering a numerical address such as &lt;code&gt;203.0.113.10&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Computers communicate over networks using IP addresses, so how does a browser know which IP address belongs to a domain name?&lt;/p&gt;

&lt;p&gt;The answer is &lt;strong&gt;DNS (Domain Name System)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;DNS is a distributed, hierarchical naming system that translates domain names into information computers can use to locate services on a network. &lt;/p&gt;

&lt;p&gt;Think of DNS as the internet's phone-book, but it is more accurate to think of it as a distributed directory.&lt;/p&gt;

&lt;p&gt;To understand how this works, let's follow what happens when someone enters &lt;code&gt;yahoo.com&lt;/code&gt; into a browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The DNS resolution process
&lt;/h2&gt;

&lt;p&gt;DNS resolution involves several components working together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DNS resolver:&lt;/strong&gt; Receives the lookup request and finds the answer on behalf of the client.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Root name servers:&lt;/strong&gt; Direct the resolver toward the correct top-level domain servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLD name servers:&lt;/strong&gt; Handle a particular top-level domain, such as &lt;code&gt;.com&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authoritative name servers:&lt;/strong&gt; Provide the DNS records for a domain, such as &lt;code&gt;yahoo.com&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS cache:&lt;/strong&gt; Stores previously obtained DNS information so it can be reused while valid.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is the simplified lookup process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You enter &lt;code&gt;yahoo.com&lt;/code&gt; in your browser.&lt;/li&gt;
&lt;li&gt;Your device checks if its available DNS caches.&lt;/li&gt;
&lt;li&gt;If no usable answer is found, it sends a query to a recursive DNS resolver.&lt;/li&gt;
&lt;li&gt;The resolver queries a root name server.&lt;/li&gt;
&lt;li&gt;The root server directs it to the &lt;code&gt;.com&lt;/code&gt; TLD name servers.&lt;/li&gt;
&lt;li&gt;The TLD server directs it to the authoritative name servers for &lt;code&gt;yahoo.com&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The authoritative server returns the requested DNS record, such as an IP address or a CNAME record.&lt;/li&gt;
&lt;li&gt;The resolver caches the response when appropriate and returns the answer to your device.&lt;/li&gt;
&lt;li&gt;Your browser can then connect to the destination using the resolved address.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is a simplified example. In practice, some steps may be skipped because of caching, and the actual DNS records returned can vary.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Understanding the DNS components
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A. DNS resolver - the coordinator
&lt;/h3&gt;

&lt;p&gt;The resolver is the component responsible for finding the answer to a DNS query.&lt;/p&gt;

&lt;p&gt;Your device commonly sends its request to a &lt;strong&gt;recursive resolver&lt;/strong&gt;, which may be operated by your internet service provider, an organization, or a public DNS provider.&lt;/p&gt;

&lt;p&gt;For example, when you request &lt;code&gt;yahoo.com&lt;/code&gt;, the resolver tries to obtain the appropriate DNS record on your behalf.&lt;/p&gt;

&lt;p&gt;It may already have the answer in its cache. If it does, it can return the answer immediately without contacting other DNS servers.&lt;/p&gt;

&lt;p&gt;If the answer is not cached, the resolver performs the necessary queries to locate it.&lt;/p&gt;

&lt;p&gt;Think of the resolver as someone looking up a person's contact details. Instead of asking you to contact several directories yourself, the resolver does the searching and returns the result.&lt;/p&gt;

&lt;h3&gt;
  
  
  B. Root name servers - finding the right direction
&lt;/h3&gt;

&lt;p&gt;If the resolver does not already have a usable answer, it can begin by querying a DNS root server.&lt;/p&gt;

&lt;p&gt;Root name servers sit at the top of the DNS hierarchy. They do not normally provide the final IP address for &lt;code&gt;yahoo.com&lt;/code&gt;. Instead, they tell the resolver where to find the name servers responsible for the relevant top-level domain.&lt;/p&gt;

&lt;p&gt;For our example, the root server points the resolver toward the &lt;code&gt;.com&lt;/code&gt; TLD name servers.&lt;/p&gt;

&lt;p&gt;There are 13 named root server identities, conventionally labelled A through M. Each identity is served by multiple physical instances distributed around the world using anycast.&lt;/p&gt;

&lt;p&gt;The important distinction is that root servers help the resolver navigate the DNS hierarchy; they are not a central database containing every website's IP address.&lt;/p&gt;

&lt;h3&gt;
  
  
  C. TLD name servers - locating the domain's authority
&lt;/h3&gt;

&lt;p&gt;TLD stands for &lt;strong&gt;Top-Level Domain&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It refers to the final part of a domain name, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.org&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.net&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.ke&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;code&gt;yahoo.com&lt;/code&gt;, the TLD is &lt;code&gt;.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After receiving a referral from a root server, the resolver queries a &lt;code&gt;.com&lt;/code&gt; TLD name server. That server identifies the authoritative name servers for &lt;code&gt;yahoo.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The TLD server generally does not return Yahoo's final website IP address. It directs the resolver to the next level of the hierarchy.&lt;/p&gt;

&lt;p&gt;Think of the root server as directing you to the correct department, while the TLD server directs you to the specific office responsible for the domain.&lt;/p&gt;

&lt;h3&gt;
  
  
  D. Authoritative name servers - the source of domain records
&lt;/h3&gt;

&lt;p&gt;Authoritative name servers hold or serve the DNS records for a domain.&lt;/p&gt;

&lt;p&gt;For &lt;code&gt;yahoo.com&lt;/code&gt;, its authoritative name servers provide the records needed to answer queries about that domain.&lt;/p&gt;

&lt;p&gt;Depending on the query, these records may include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A record:&lt;/strong&gt; Maps a hostname to an IPv4 address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AAAA record:&lt;/strong&gt; Maps a hostname to an IPv6 address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CNAME record:&lt;/strong&gt; Identifies another canonical hostname.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MX record:&lt;/strong&gt; Identifies mail servers for a domain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NS record:&lt;/strong&gt; Identifies the domain's authoritative name servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TXT record:&lt;/strong&gt; Stores text data used for purposes such as domain verification and email authentication.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, a query for an A record asks for the IPv4 address associated with a hostname.&lt;/p&gt;

&lt;p&gt;The authoritative server might return an address, or it might return a CNAME that leads to another hostname requiring further resolution.&lt;/p&gt;

&lt;p&gt;The exact records and addresses for Yahoo can change, so the values in this article are illustrative rather than a claim about Yahoo's current DNS configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Following a request to &lt;code&gt;yahoo.com&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Let's put the components together.&lt;/p&gt;

&lt;p&gt;Imagine that you open your browser and enter:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://yahoo.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Assume, for this example, that neither your device nor your recursive resolver has a usable cached answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Your browser needs to resolve the hostname.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your device checks available local caches and configured DNS resolution mechanisms. If it needs a new answer, it sends a query to its configured recursive resolver.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: The resolver queries a root server.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The root server responds with a referral identifying the name servers for &lt;code&gt;.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: The resolver queries a &lt;code&gt;.com&lt;/code&gt; TLD server.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The TLD server returns a referral to the authoritative name servers for &lt;code&gt;yahoo.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: The resolver queries an authoritative name server.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The resolver asks for the relevant DNS record, such as the A or AAAA record for &lt;code&gt;yahoo.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The authoritative server returns the requested information, possibly including a CNAME that requires another lookup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: The resolver returns the answer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the resolver has obtained the information needed to answer the query, it returns the result to your device and caches the applicable records according to their TTLs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: The browser connects to the destination.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The browser uses the resolved address to establish a connection to the website. For HTTPS, this also involves TLS negotiation before the encrypted HTTP exchange can proceed.&lt;/p&gt;

&lt;p&gt;DNS resolution helps locate the destination, but it does not itself load the webpage or establish the HTTPS connection.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. DNS caching - why every request doesn't start from scratch
&lt;/h2&gt;

&lt;p&gt;One of the most important things I learned is that DNS does not need to repeat the entire lookup process every time a domain is requested.&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;DNS caching&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;Caching means temporarily storing DNS answers so they can be reused rather than retrieving them again from the original source.&lt;/p&gt;

&lt;p&gt;DNS information can be cached at several levels, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The browser, where supported.&lt;/li&gt;
&lt;li&gt;The operating system.&lt;/li&gt;
&lt;li&gt;A local network's DNS forwarder.&lt;/li&gt;
&lt;li&gt;The recursive DNS resolver.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exact caching layers depend on the device, operating system, browser, and network configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  How caching works
&lt;/h3&gt;

&lt;p&gt;Suppose you visit &lt;code&gt;yahoo.com&lt;/code&gt; for the first time.&lt;/p&gt;

&lt;p&gt;Your recursive resolver has no cached answer, so it follows the DNS hierarchy, obtains the relevant records, and returns the result.&lt;/p&gt;

&lt;p&gt;Now imagine you visit the site again a short time later.&lt;/p&gt;

&lt;p&gt;If the resolver still has a valid cached answer, it can return that answer immediately. It does not need to contact the root, TLD, and authoritative servers again.&lt;/p&gt;

&lt;p&gt;This reduces DNS lookup latency, network traffic, and the workload on DNS infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is TTL?
&lt;/h3&gt;

&lt;p&gt;DNS records commonly have a &lt;strong&gt;TTL (Time to Live)&lt;/strong&gt;, measured in seconds.&lt;/p&gt;

&lt;p&gt;The TTL tells a caching resolver how long it may reuse a DNS record before it must treat that cached copy as expired.&lt;/p&gt;

&lt;p&gt;For example, imagine an illustrative DNS record has a TTL of 300 seconds.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At the time of retrieval, the record has a TTL of 300 seconds.&lt;/li&gt;
&lt;li&gt;After 100 seconds, a cache that tracks the record's age would have approximately 200 seconds remaining.&lt;/li&gt;
&lt;li&gt;After 300 seconds, the cached record expires and cannot be reused as a fresh answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The resolver will then need to obtain fresh information before answering from that record again, unless another applicable mechanism or cache supplies a valid answer.&lt;/p&gt;

&lt;p&gt;Different DNS records can have different TTLs. An answer may also contain multiple records, each with its own caching lifetime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why TTL matters in DevOps
&lt;/h3&gt;

&lt;p&gt;TTL becomes particularly important when infrastructure changes.&lt;/p&gt;

&lt;p&gt;Imagine a service moves from one IP address to another during a deployment or migration.&lt;/p&gt;

&lt;p&gt;If clients or recursive resolvers still hold the old DNS record, some requests may continue to use the previous address until the relevant cached information expires or is otherwise refreshed.&lt;/p&gt;

&lt;p&gt;This is one reason DNS changes are not always visible everywhere immediately.&lt;/p&gt;

&lt;p&gt;Lowering a record's TTL ahead of a planned migration can help reduce how long caches retain the old answer. However, lowering it does not invalidate copies that were already cached with a longer TTL.&lt;/p&gt;

&lt;p&gt;DNS caching also does not guarantee that a service remains available. If a cached address points to an unhealthy server, clients may still attempt to connect to that server.&lt;/p&gt;

&lt;p&gt;Understanding TTLs is therefore useful when managing deployments, traffic routing, service migrations, and incident response.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Recursive versus authoritative DNS
&lt;/h2&gt;

&lt;p&gt;These two roles are easy to confuse, but they solve different problems.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Recursive resolver&lt;/th&gt;
&lt;th&gt;Authoritative name server&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Finds answers on behalf of clients&lt;/td&gt;
&lt;td&gt;Serves DNS records for domains it is authoritative for&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;May query other DNS servers&lt;/td&gt;
&lt;td&gt;Provides authoritative answers or referrals as appropriate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Caches responses when permitted&lt;/td&gt;
&lt;td&gt;Publishes or serves the domain's DNS data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Commonly used by devices to resolve hostnames&lt;/td&gt;
&lt;td&gt;Commonly queried by recursive resolvers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A recursive resolver is focused on obtaining an answer for the client. An authoritative server is responsible for supplying DNS information for its zone.&lt;/p&gt;

&lt;p&gt;A single organization can operate both kinds of infrastructure, but the roles remain distinct.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. What happens when DNS resolution fails?
&lt;/h2&gt;

&lt;p&gt;Understanding the normal process is useful, but a DevOps engineer also needs to recognize what happens when it breaks.&lt;/p&gt;

&lt;p&gt;Some common causes of DNS-related problems include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An incorrect or missing DNS record.&lt;/li&gt;
&lt;li&gt;Incorrect authoritative name server delegation.&lt;/li&gt;
&lt;li&gt;An unreachable or misconfigured recursive resolver.&lt;/li&gt;
&lt;li&gt;A stale cached record pointing to an old destination.&lt;/li&gt;
&lt;li&gt;DNS traffic being blocked by network rules.&lt;/li&gt;
&lt;li&gt;A CNAME chain that leads to a hostname that cannot be resolved.&lt;/li&gt;
&lt;li&gt;A domain's records not being configured as expected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if &lt;code&gt;yahoo.com&lt;/code&gt; resolves successfully but the website does not load, DNS might not be the problem at all. The destination server, network connection, TLS configuration, or application could be failing instead.&lt;/p&gt;

&lt;p&gt;This distinction is important during troubleshooting: resolving a hostname successfully does not prove that the application behind it is healthy.&lt;/p&gt;

&lt;p&gt;On Linux, a few useful diagnostic commands are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Query DNS records using the system's configured resolver&lt;/span&gt;
getent ahosts yahoo.com

&lt;span class="c"&gt;# Query an A record&lt;/span&gt;
dig yahoo.com A

&lt;span class="c"&gt;# Query an AAAA record&lt;/span&gt;
dig yahoo.com AAAA

&lt;span class="c"&gt;# Query the MX records&lt;/span&gt;
dig yahoo.com MX

&lt;span class="c"&gt;# Trace the DNS delegation path&lt;/span&gt;
dig +trace yahoo.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;dig +trace&lt;/code&gt; command is particularly useful for learning because it shows the delegation process from the root through the relevant TLD and authoritative servers, subject to the network environment.&lt;/p&gt;

&lt;p&gt;These commands help separate DNS resolution issues from application-level failures.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. What I took away from this lesson
&lt;/h2&gt;

&lt;p&gt;Learning about DNS helped me understand that accessing a website involves more than simply entering a URL into a browser.&lt;/p&gt;

&lt;p&gt;Behind a domain name is a distributed system of resolvers, root servers, TLD servers, authoritative name servers, and caching mechanisms. Each component has a specific responsibility, and together they allow users to locate services without needing to remember IP addresses.&lt;/p&gt;

&lt;p&gt;The part that stood out to me most was DNS caching. It is a simple but important optimization that reduces repeated lookups, but it also explains why infrastructure changes may not take effect everywhere at the same time.&lt;/p&gt;

&lt;p&gt;As I continue learning DevOps, I can see how DNS knowledge applies directly to deployment workflows, production troubleshooting, domain configuration, load balancing, and service availability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The key takeaway:&lt;/strong&gt; DNS is not a single server translating every domain into an IP address. It is a hierarchical, distributed lookup system, and caching helps make that system efficient.&lt;/p&gt;




&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.icann.org/resources/pages/what-2012-02-25-en" rel="noopener noreferrer"&gt;ICANN - What Is DNS?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cloudflare.com/learning/dns/what-is-dns/" rel="noopener noreferrer"&gt;Cloudflare Learning Center - What is DNS?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc1034" rel="noopener noreferrer"&gt;RFC 1034 - Domain Names: Concepts and Facilities&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc1035" rel="noopener noreferrer"&gt;RFC 1035 - Domain Names: Implementation and Specification&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dns</category>
      <category>networking</category>
      <category>devops</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>From One Laptop to HTTPS: Deploying Miren on EC2</title>
      <dc:creator>Richard Kabi</dc:creator>
      <pubDate>Sun, 18 Oct 2026 15:16:11 +0000</pubDate>
      <link>https://dev.to/nebulascout/from-one-laptop-to-https-deploying-miren-on-ec2-245a</link>
      <guid>https://dev.to/nebulascout/from-one-laptop-to-https-deploying-miren-on-ec2-245a</guid>
      <description>&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;I deployed &lt;code&gt;bin/miren&lt;/code&gt;, the Miren runtime binary, from my development environment to an EC2 instance and configured HTTPS access through Caddy.&lt;/p&gt;

&lt;p&gt;The objective was more than getting the application to respond to a request. I wanted to move from an application that worked on one laptop to a deployment that could run independently on a real Linux host, recover from unexpected process termination, start automatically after a reboot, and serve traffic over HTTPS.&lt;/p&gt;

&lt;p&gt;Getting there exposed several practical challenges: establishing administrative access through AWS Systems Manager (SSM), diagnosing a service that exited immediately after starting, understanding the runtime's privilege requirements, and configuring TLS termination.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Establishing access through AWS SSM
&lt;/h3&gt;

&lt;p&gt;Direct SSH access was not convenient in this environment, so I used AWS Systems Manager Session Manager with port forwarding to tunnel SSH traffic.&lt;/p&gt;

&lt;p&gt;The forwarding configuration mapped local port &lt;code&gt;2222&lt;/code&gt; to port &lt;code&gt;22&lt;/code&gt; on the EC2 instance. This allowed me to connect through &lt;code&gt;localhost:2222&lt;/code&gt; and transfer the binary and configuration files without opening an additional inbound SSH port on the instance.&lt;/p&gt;

&lt;p&gt;The command was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ssm start-session &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--target&lt;/span&gt; &amp;lt;instance-id&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--document-name&lt;/span&gt; AWS-StartPortForwardingSession &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--parameters&lt;/span&gt; &lt;span class="s1"&gt;'{"portNumber":["22"],"localPortNumber":["2222"]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the session running, I could use SSH and SCP through the forwarded port. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-p&lt;/span&gt; 2222 &amp;lt;ssh-user&amp;gt;@localhost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And, from another terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;scp &lt;span class="nt"&gt;-P&lt;/span&gt; 2222 bin/miren &amp;lt;ssh-user&amp;gt;@localhost:/tmp/miren
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach requires an appropriately configured SSM-managed instance, the necessary IAM permissions, and a working SSM connectivity path.&lt;/p&gt;

&lt;p&gt;It was my first time using SSM port forwarding this way. For this deployment, it provided a convenient alternative to exposing SSH directly or introducing a jump host.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Configuring Miren as a systemd service
&lt;/h3&gt;

&lt;p&gt;After transferring the binary, I configured a systemd unit so that Miren could run as a managed service rather than depending on an interactive terminal session.&lt;/p&gt;

&lt;p&gt;The important directives included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ExecStart&lt;/code&gt;: specifies the executable systemd should run.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WorkingDirectory&lt;/code&gt;: defines the service's working directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Restart=always&lt;/code&gt;: instructs systemd to restart the service after it exits, subject to systemd's restart and start-rate limits.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RestartSec&lt;/code&gt;: introduces a delay before restarting the service.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WantedBy=multi-user.target&lt;/code&gt;: allows the service to be enabled for the normal multi-user boot target.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After creating the unit, the relevant commands were:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl daemon-reload
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;miren
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start miren
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, the service repeatedly became &lt;code&gt;inactive (dead)&lt;/code&gt; shortly after starting.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Diagnosing the service that kept exiting
&lt;/h3&gt;

&lt;p&gt;My initial focus was on the systemd configuration, permissions, and service setup. Inspecting the service logs helped narrow down the problem.&lt;/p&gt;

&lt;p&gt;I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status miren
&lt;span class="nb"&gt;sudo &lt;/span&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; miren &lt;span class="nt"&gt;-n&lt;/span&gt; 50 &lt;span class="nt"&gt;--no-pager&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The actual cause was simpler than I expected: I had transferred an outdated build of &lt;code&gt;bin/miren&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After replacing it with the intended binary and correcting its permissions and ownership, the service remained running.&lt;/p&gt;

&lt;p&gt;This was a useful reminder that an application startup failure is not necessarily a systemd problem. The executable itself, its version, its architecture, its permissions, and its runtime dependencies all need to be considered.&lt;/p&gt;

&lt;p&gt;A service manager can restart a process, but it cannot correct a broken or outdated application binary.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Understanding the containerd privilege requirement
&lt;/h3&gt;

&lt;p&gt;Another challenge emerged when I considered running Miren under a dedicated, non-root service account.&lt;/p&gt;

&lt;p&gt;A non-root service account is generally preferable because it limits the impact of a compromised process. However, Miren interacts with containerd to manage containers, and its runtime requirements introduced a privilege constraint in this deployment.&lt;/p&gt;

&lt;p&gt;This forced me to reconsider my original plan.&lt;/p&gt;

&lt;p&gt;It is important to distinguish between three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The privileges required by the containerd daemon itself.&lt;/li&gt;
&lt;li&gt;The permissions required to access the containerd socket.&lt;/li&gt;
&lt;li&gt;The privileges required by the Miren process to perform its operations.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Access to a privileged containerd socket can itself grant substantial control over the host, so giving a process socket access is not automatically equivalent to running it with minimal privileges.&lt;/p&gt;

&lt;p&gt;My experience showed me that least privilege must be applied with an understanding of the software's actual requirements. If a component genuinely requires elevated privileges, the next step is to identify the precise requirement and apply appropriate compensating controls rather than assuming that a non-root configuration will work.&lt;/p&gt;

&lt;p&gt;I would verify whether Miren can operate with restricted socket access or a more limited service account before concluding that running the entire service as root is unavoidable.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Configuring HTTPS with Caddy and Cloudflare DNS
&lt;/h3&gt;

&lt;p&gt;Once the application was running, I configured Caddy as a TLS-terminating reverse proxy and configured Cloudflare DNS to point the application domain to the EC2 instance.&lt;/p&gt;

&lt;p&gt;The intended request flow was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client
  |
  | HTTPS
  v
Application domain
  |
  v
EC2 instance
  |
  v
Caddy (TLS termination)
  |
  v
Miren runtime
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This illustrates the main components; the actual connection between Caddy and Miren depends on the upstream address and protocol configured in Caddy.&lt;/p&gt;

&lt;p&gt;Caddy can obtain and renew publicly trusted TLS certificates automatically when its domain, DNS, network accessibility, and configuration satisfy the relevant requirements. Cloudflare DNS provides name resolution, while Cloudflare's optional proxy service introduces an additional layer if enabled.&lt;/p&gt;

&lt;p&gt;An important distinction is that HTTPS to Caddy does not automatically mean that every connection between the client, any intermediary proxy, and the application process uses TLS. The security of each connection depends on the actual request path and its configuration.&lt;/p&gt;

&lt;p&gt;The objective was to make the application accessible through its domain over HTTPS rather than relying on plain HTTP.&lt;/p&gt;

&lt;h2&gt;
  
  
  The concepts behind the deployment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. A successful request is not proof of a reliable deployment
&lt;/h3&gt;

&lt;p&gt;An application responding to &lt;code&gt;curl&lt;/code&gt; once proves that it can serve a request under those conditions. It does not prove that it will recover from a failure or start after the host restarts.&lt;/p&gt;

&lt;p&gt;I treated deployment reliability as a set of separate concerns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Availability:&lt;/strong&gt; can the application respond to requests?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process recovery:&lt;/strong&gt; does the service recover after an unexpected process exit?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boot persistence:&lt;/strong&gt; does the service start automatically after a host reboot?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transport security:&lt;/strong&gt; is traffic protected appropriately in transit?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each concern requires its own verification.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. systemd provides process supervision, not application correctness
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;Restart=always&lt;/code&gt; directive helps systemd recover from unexpected process exits. However, restart behavior is subject to systemd's configuration, including start-rate limiting and restart delays.&lt;/p&gt;

&lt;p&gt;A restart policy does not guarantee that an application will become healthy. A service can repeatedly crash, restart, and fail again.&lt;/p&gt;

&lt;p&gt;The important distinction is between a process being started and an application being ready to serve requests.&lt;/p&gt;

&lt;p&gt;For production systems, process supervision should be combined with application-level health checks, useful logs, and monitoring appropriate to the workload.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Least privilege requires understanding runtime dependencies
&lt;/h3&gt;

&lt;p&gt;Running services under dedicated accounts reduces unnecessary privileges, but the account must still have the permissions required to perform its intended work.&lt;/p&gt;

&lt;p&gt;When containers are involved, permissions around the container runtime and its control socket deserve particular attention. A service should not receive unrestricted host-level access simply because it needs to manage containers.&lt;/p&gt;

&lt;p&gt;The correct approach is to establish the minimum required permissions, test the resulting configuration, and document any privileges that cannot safely be removed.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. HTTPS protects connections, but the entire request path matters
&lt;/h3&gt;

&lt;p&gt;Plain HTTP does not provide transport encryption or server authentication. HTTPS protects the connection between the client and the TLS endpoint, assuming the certificate is valid and the client verifies it correctly.&lt;/p&gt;

&lt;p&gt;When a reverse proxy terminates TLS, the connection from the proxy to the upstream application must be considered separately.&lt;/p&gt;

&lt;p&gt;For a deployment using Cloudflare and an origin proxy, I need to understand which connections are encrypted, how the origin is authenticated, and which ports are publicly reachable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical commands and troubleshooting notes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Inspect a systemd service
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status miren
&lt;span class="nb"&gt;sudo &lt;/span&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; miren &lt;span class="nt"&gt;-n&lt;/span&gt; 50 &lt;span class="nt"&gt;--no-pager&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl is-enabled miren
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl is-active miren
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands help distinguish service state, startup errors, boot configuration, and current activity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the executable
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; /opt/miren/bin/miren
file /opt/miren/bin/miren
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first command checks file permissions and ownership. The second helps identify the executable's file format and architecture.&lt;/p&gt;

&lt;p&gt;Where possible, I should also verify the build version or commit identifier against the intended release before transferring a binary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verify HTTPS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-Iv&lt;/span&gt; https://&amp;lt;your-domain&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This provides information about the HTTPS connection and response. It should be supplemented by checking the certificate's hostname, validity period, and trust chain.&lt;/p&gt;

&lt;p&gt;A successful HTTP response alone does not prove that every part of the deployment is configured securely.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would do differently
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Verify the binary before investigating systemd
&lt;/h3&gt;

&lt;p&gt;I spent time examining service configuration when the actual problem was an outdated binary.&lt;/p&gt;

&lt;p&gt;Before deployment, I would verify the executable's version or build identifier, architecture, permissions, and expected runtime dependencies. I would also confirm that the file transferred to the server matches the intended artifact.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Investigate runtime requirements before designing service permissions
&lt;/h3&gt;

&lt;p&gt;I would identify Miren's requirements for containerd access, socket permissions, and privileged operations before finalizing the service account.&lt;/p&gt;

&lt;p&gt;This would allow me to design the security model around verified requirements instead of discovering constraints after implementing a restrictive configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Follow a consistent first-deployment checklist
&lt;/h3&gt;

&lt;p&gt;For future deployments, I would use this sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verify the target host and operating system.&lt;/li&gt;
&lt;li&gt;Confirm the binary and its dependencies.&lt;/li&gt;
&lt;li&gt;Run the application manually in a controlled environment where appropriate.&lt;/li&gt;
&lt;li&gt;Create and validate the systemd unit.&lt;/li&gt;
&lt;li&gt;Reload systemd and start the service.&lt;/li&gt;
&lt;li&gt;Inspect service status and logs immediately.&lt;/li&gt;
&lt;li&gt;Verify application functionality.&lt;/li&gt;
&lt;li&gt;Test recovery from unexpected process termination.&lt;/li&gt;
&lt;li&gt;Reboot the host and verify automatic service startup.&lt;/li&gt;
&lt;li&gt;Configure HTTPS and verify the certificate and request path.&lt;/li&gt;
&lt;li&gt;Review exposed ports, service privileges, and logs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This order should make failures easier to isolate and reduce time spent debugging unrelated layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;This deployment reinforced several lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A deployment is more than a successful application startup.&lt;/li&gt;
&lt;li&gt;Stale binaries can produce misleading debugging sessions.&lt;/li&gt;
&lt;li&gt;systemd can supervise a process, but it cannot guarantee application health.&lt;/li&gt;
&lt;li&gt;Container runtime permissions must be understood before designing a least-privilege service configuration.&lt;/li&gt;
&lt;li&gt;HTTPS must be evaluated across the actual request path, especially when reverse proxies or CDN services are involved.&lt;/li&gt;
&lt;li&gt;Reliability claims should be backed by observable verification results.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most important lesson was that deploying software requires more than making it work once. It requires understanding the application, its dependencies, its privileges, its failure modes, and the evidence needed to establish that the deployment is behaving as intended.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html" rel="noopener noreferrer"&gt;systemd.service documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html" rel="noopener noreferrer"&gt;systemd.unit documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html" rel="noopener noreferrer"&gt;AWS Systems Manager port forwarding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://caddyserver.com/docs/" rel="noopener noreferrer"&gt;Caddy documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://letsencrypt.org/docs/" rel="noopener noreferrer"&gt;Let's Encrypt documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://containerd.io/docs/" rel="noopener noreferrer"&gt;containerd documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This write-up documents my learning from a real deployment. Before publishing, I will confirm that the details are permitted to be shared and add the actual verification results from the deployment.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>aws</category>
      <category>miren</category>
    </item>
  </channel>
</rss>
