Skip to content

fix(describe): omit xdebug_enabled from describe output, fixes #8159#8360

Draft
jonesrussell wants to merge 1 commit into
ddev:mainfrom
jonesrussell:20260428_jones_describe_xdebug_8159
Draft

fix(describe): omit xdebug_enabled from describe output, fixes #8159#8360
jonesrussell wants to merge 1 commit into
ddev:mainfrom
jonesrussell:20260428_jones_describe_xdebug_8159

Conversation

@jonesrussell

Copy link
Copy Markdown
Contributor

The Issue

ddev describe JSON included xdebug_enabled from project config, which reads like live Xdebug status and misleads users. Runtime state should come from ddev xdebug status.

How This PR Solves The Issue

  • Stops adding xdebug_enabled to the Describe() map so ddev describe -j / raw output no longer exposes it.
  • TUI project detail still shows Xdebug using the loaded app’s XdebugEnabled from config after Describe().
  • Docs note the JSON omission and point to ddev xdebug status for runtime state.
  • TestDdevDescribe asserts the key is absent when stopped and running.

Manual Testing Instructions

  1. In a PHP project: ddev describe -j | jq .raw — confirm no xdebug_enabled key.
  2. ddev xdebug status — confirm runtime messaging still reflects actual Xdebug mode.
  3. Optionally open interactive TUI and confirm Xdebug reflects config where shown.

Automated Testing Overview

  • Extended TestDdevDescribe to assert xdebug_enabled is not present in describe output.
  • go test ./pkg/tui -short; golangci-lint on touched packages passes.

Release/Deployment Notes

  • Breaking: Any automation parsing describe JSON for xdebug_enabled must switch to reading .ddev/config.yaml / project config or use ddev xdebug status.

Made with Cursor



- Remove xdebug_enabled from Describe() map (JSON/raw) to avoid implying runtime state
- TUI detail uses loaded app config for XdebugEnabled
- Document JSON behavior; use `ddev xdebug status` for runtime state
- Assert absent in TestDdevDescribe

Made-with: Cursor
@github-actions

Copy link
Copy Markdown

@rfay

rfay commented Apr 28, 2026

Copy link
Copy Markdown
Member

Looks fine. I have always felt that the config entity in config.yaml was a mistake, but never had the temerity to remove it as I figured somebody had to be using it. ddev xdebug on has worked so very much better. Perhaps we should remove it at the next major.

Comment thread pkg/tui/commands.go
detail.DatabaseType, _ = desc["database_type"].(string)
detail.DatabaseVersion, _ = desc["database_version"].(string)
detail.XdebugEnabled, _ = desc["xdebug_enabled"].(bool)
detail.XdebugEnabled = app.XdebugEnabled

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue says:

Show real Xdebug runtime status if we want to surface it at all (similar to XHProfStatus)

But app.XdebugEnabled doesn't reflect the status in real time.

So this PR doesn't actually change the TUI behavior, which was the original intent.

I would either remove it from both ddev describe -j and the TUI, or add the current runtime status to the TUI.


To make sure we don't break any third-party tools by changing ddev describe -j, I checked for xdebug_enabled in:

and didn't find any usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ddev describe shows config value for Xdebug instead of real runtime status

3 participants