Experimental: Live Debugger support in
dtctlis experimental. The underlying APIs and query behavior may change in future releases without notice.
This guide explains how to use Dynatrace Live Debugger features from dtctl.
The current Live Debugger flow in dtctl supports:
- configuring workspace filters with
dtctl update breakpoint --filters ... - creating breakpoints with
dtctl create breakpoint File.java:line - listing breakpoints with
dtctl get breakpoints - describing breakpoint status with
dtctl describe <id|filename:line> - updating breakpoints with
dtctl update breakpoint ... - deleting breakpoints with
dtctl delete breakpoint ... - viewing decoded snapshot output with
dtctl query ... --decode-snapshots
dtctl resolves or creates a Live Debugger workspace for the current project path, so commands operate on the workspace associated with the directory you run them from.
Before using Live Debugger commands:
- Configure a Dynatrace context with
dtctl config set-context - Authenticate with OAuth using
dtctl auth login - Run Live Debugger commands from the project directory you want associated with the workspace
Live Debugger breakpoint operations currently require OAuth authentication.
The dev-obs:breakpoints:set scope is supported via dtctl auth login, but is not currently supported when authenticating with API tokens (for example via dtctl config set-credentials).
Use dtctl update breakpoint --filters to target the runtime instances you want Live Debugger to apply to.
dtctl update breakpoint --filters k8s.namespace.name:prodMultiple filters are supported as comma-separated key:value pairs.
key=value is also supported for compatibility.
dtctl update breakpoints --filters k8s.namespace.name:prod,dt.entity.host:HOST-123
dtctl update breakpoint --filters k8s.namespace.name=prod,dt.entity.host=HOST-123--filtersis required fordtctl update breakpoint- filter values are mapped to the Live Debugger workspace filter set payload
- repeated keys are supported
- in verbose/debug mode, raw GraphQL responses are printed for troubleshooting
Create a breakpoint by file and line number:
dtctl create breakpoint OrderController.java:306- the expected format is
File.java:line - the line number must be a positive integer
--dry-runis supported
Example:
dtctl create breakpoint OrderController.java:306 --dry-runList breakpoints in the current workspace:
dtctl get breakpointsDefault output is a table with:
- breakpoint ID
- filename
- line number
- active state
Structured output is also supported:
dtctl get breakpoints -o json
dtctl get breakpoints -o yamlInspect the current status of a breakpoint by ID or source location:
dtctl describe dtctl-rule-123dtctl describe OrderController.java:306The command uses GetRuleStatusBreakdown and summarizes:
- enabled/disabled state
- overall status
- active and pending rooks
- warnings and errors
- controller warnings and errors
- backend tips
Structured output is supported:
dtctl describe OrderController.java:306 -o json
dtctl describe OrderController.java:306 -o yamlUpdate a breakpoint condition:
dtctl update breakpoint OrderController.java:306 --condition "value>othervalue"Enable or disable a breakpoint:
dtctl update breakpoint OrderController.java:306 --enabled true
dtctl update breakpoint OrderController.java:306 --enabled false- identifiers can be either a mutable breakpoint ID or
filename:line - source locations resolve all matching breakpoints in the current workspace
--dry-runis supported
Delete a breakpoint by ID:
dtctl delete breakpoint dtctl-rule-123Delete all breakpoints at a source location:
dtctl delete breakpoint OrderController.java:306Delete all breakpoints in the current workspace:
dtctl delete breakpoint --all- delete commands require confirmation by default
-yor--yesskips confirmation--dry-runshows what would be deleted
Examples:
dtctl delete breakpoint --all -y
dtctl delete breakpoint OrderController.java:306 --dry-runLive Debugger snapshot data can be decoded using the --decode-snapshots flag on query.
Example:
# Simplified output (variant wrappers flattened to plain values)
dtctl query "fetch application.snapshots | sort timestamp desc | limit 5" --decode-snapshots
# Full decoded tree with type annotations
dtctl query "fetch application.snapshots | sort timestamp desc | limit 5" --decode-snapshots=full
# Compose with any output format
dtctl query "fetch application.snapshots | sort timestamp desc | limit 5" --decode-snapshots -o json
dtctl query "fetch application.snapshots | sort timestamp desc | limit 5" --decode-snapshots -o yamlThe --decode-snapshots flag enriches each record with a decoded parsed_snapshot field built from:
snapshot.datasnapshot.string_map
By default, --decode-snapshots simplifies variant wrappers to plain values (e.g., {"type": "Integer", "value": 42} becomes 42). Use --decode-snapshots=full to preserve the full decoded tree with type annotations.
- successful mutating commands are quiet by default
- listing and describe commands use human-readable output by default
Use -v or --debug when you want raw GraphQL payloads for troubleshooting.
Use -o json or -o yaml when you want automation-friendly output.
Live Debugger mutating commands follow dtctl safety conventions:
- filter updates use update safety checks
- breakpoint creation uses create safety checks
- edit operations use update safety checks
- delete operations use delete safety checks
- destructive delete operations support confirmation bypass with
-y - supported mutating commands provide
--dry-run
# Target a workload
dtctl update breakpoint --filters k8s.namespace.name:prod
# Create a breakpoint
dtctl create breakpoint OrderController.java:306
# List current breakpoints
dtctl get breakpoints
# Inspect status
dtctl describe OrderController.java:306
# Update condition
dtctl update breakpoint OrderController.java:306 --condition "orderId != null"
# Disable the breakpoint
dtctl update breakpoint OrderController.java:306 --enabled false
# View snapshots (simplified)
dtctl query "fetch application.snapshots | sort timestamp desc | limit 5" --decode-snapshots
# View snapshots as YAML
dtctl query "fetch application.snapshots | sort timestamp desc | limit 5" --decode-snapshots -o yaml
# Delete the breakpoint
dtctl delete breakpoint OrderController.java:306