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.
Table of contents
The checkbox approachThe YAML equivalent: system.debugWhat you actually getDon't leave it on permanentlyMore informationQuestions 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.