<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/enabling-diagnostics-in-a-yaml-pipeline-in-azure-devops-guyr5vu43" -->

---
title: Enabling diagnostics in a YAML pipeline in Azure DevOps
description: Azure DevOps YAML pipelines support verbose diagnostic logging via the `system.debug` variable. Setting it to `true` in the pipeline YAML enables the same...
canonical: https://daily.dev/posts/enabling-diagnostics-in-a-yaml-pipeline-in-azure-devops-guyr5vu43
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Enabling diagnostics in a YAML pipeline in Azure DevOps | daily.dev
og:description: Azure DevOps YAML pipelines support verbose diagnostic logging via the `system.debug` variable. Setting it to `true` in the pipeline YAML enables the same...
og:url: https://daily.dev/posts/enabling-diagnostics-in-a-yaml-pipeline-in-azure-devops-guyr5vu43
og:image: https://api.daily.dev/og/posts/guyr5vu43.png
og:image:alt: Enabling diagnostics in a YAML pipeline in Azure DevOps
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Enabling diagnostics in a YAML pipeline in Azure DevOps

**[The Art of Simplicity](https://daily.dev/sources/bartwullems)** · 3 min read · 0 upvotes · 0 comments

## Summary

Azure DevOps YAML pipelines support verbose diagnostic logging via the `system.debug` variable. Setting it to `true` in the pipeline YAML enables the same detailed output as the manual 'Enable system diagnostics' checkbox, but works for all run types including CI-triggered and scheduled runs. Debug output includes variable resolution, internal task decisions, and per-step resource utilization (disk, memory, CPU). On self-hosted agents v2.200.0+, it also enables network diagnostics via `Agent.Diagnostic`. The recommendation is to use it temporarily during debugging and remove it afterward to keep logs clean.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://bartwullems.blogspot.com/2026/08/enabling-diagnostics-in-yaml-pipeline.html>

## Questions this post answers

### How do I enable system diagnostics in an Azure DevOps YAML pipeline without manually queuing a run?

Set the `system.debug` variable to `true` in your YAML pipeline definition. This produces the same verbose logging as the manual 'Enable system diagnostics' checkbox, and applies to every run type — manual, CI-triggered, and scheduled. Debug output includes variable resolution, internal task decision points, and per-step resource utilization such as disk, memory, and CPU usage.

_Teams debugging flaky Azure DevOps pipelines track tips like this on daily.dev._

### What does setting system.debug to true do on a self-hosted Azure DevOps agent?

Setting `system.debug: true` also automatically sets `Agent.Diagnostic` to `true`. On self-hosted agents running v2.200.0 or later, this enables network diagnostics in addition to the standard verbose task logging, which helps identify whether a failing step is caused by a task error or a network connectivity issue on the agent itself.

_Engineers running self-hosted Azure DevOps agents find agent-specific gotchas like this on daily.dev._

## Similar posts on daily.dev

- [Debugging your VSCode agent interactions](https://daily.dev/posts/debugging-your-vscode-agent-interactions-1f4baaf8d) · The Art of Simplicity · 0 upvotes · 0 comments
- [Microsoft.Testing.Platform Now Fully Supported in Azure DevOps](https://daily.dev/posts/microsoft-testing-platform-now-fully-supported-in-azure-devops-bhgc8b7g8) · DevBlogs · 0 upvotes · 0 comments
- [Mastering the Diagnostic pivot from Health Policy to Pod](https://daily.dev/posts/mastering-the-diagnostic-pivot-from-health-policy-to-pod-kgxjicuro) · Coralogix · 0 upvotes · 0 comments
- [Unlocking CI/CD success with observability](https://daily.dev/posts/unlocking-ci-cd-success-with-observability-us7lxbswk) · Dynatrace · 1 upvotes · 0 comments
- [Microsoft Testing Platform GitHub and Azure DevOps Reporting](https://daily.dev/posts/microsoft-testing-platform-github-and-azure-devops-reporting-pe6wqvpos) · We Are .NET · 2 upvotes · 0 comments

---

Tags: [#cicd](https://daily.dev/tags/cicd), [#azure-devops](https://daily.dev/tags/azure-devops)

[View this post on daily.dev](https://daily.dev/posts/enabling-diagnostics-in-a-yaml-pipeline-in-azure-devops-guyr5vu43)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Enabling diagnostics in a YAML pipeline in Azure DevOps","url":"https://daily.dev/posts/enabling-diagnostics-in-a-yaml-pipeline-in-azure-devops-guyr5vu43","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/enabling-diagnostics-in-a-yaml-pipeline-in-azure-devops-guyr5vu43"},"datePublished":"2026-08-07T07:02:15.010Z","dateModified":"2026-08-07T07:02:37.304Z","description":"Azure DevOps YAML pipelines support verbose diagnostic logging via the `system.debug` variable. Setting it to `true` in the pipeline YAML enables the same...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f4324ef02ad39d94c9ba41db19e67d25?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f4324ef02ad39d94c9ba41db19e67d25?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"The Art of Simplicity","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Art of Simplicity","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/52b68c70636d44f0901ae7cd107c9438","url":"https://daily.dev/sources/bartwullems"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/enabling-diagnostics-in-a-yaml-pipeline-in-azure-devops-guyr5vu43","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"cicd,azure-devops","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Art of Simplicity","item":"https://daily.dev/sources/bartwullems"},{"@type":"ListItem","position":3,"name":"Enabling diagnostics in a YAML pipeline in Azure DevOps"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/enabling-diagnostics-in-a-yaml-pipeline-in-azure-devops-guyr5vu43#faq","mainEntity":[{"@type":"Question","name":"How do I enable system diagnostics in an Azure DevOps YAML pipeline without manually queuing a run?","acceptedAnswer":{"@type":"Answer","text":"Set the `system.debug` variable to `true` in your YAML pipeline definition. This produces the same verbose logging as the manual 'Enable system diagnostics' checkbox, and applies to every run type — manual, CI-triggered, and scheduled. Debug output includes variable resolution, internal task decision points, and per-step resource utilization such as disk, memory, and CPU usage. Teams debugging flaky Azure DevOps pipelines track tips like this on daily.dev."}},{"@type":"Question","name":"What does setting system.debug to true do on a self-hosted Azure DevOps agent?","acceptedAnswer":{"@type":"Answer","text":"Setting `system.debug: true` also automatically sets `Agent.Diagnostic` to `true`. On self-hosted agents running v2.200.0 or later, this enables network diagnostics in addition to the standard verbose task logging, which helps identify whether a failing step is caused by a task error or a network connectivity issue on the agent itself. Engineers running self-hosted Azure DevOps agents find agent-specific gotchas like this on daily.dev."}}]}
```

