Skip to content

Conversation

@bcotrim
Copy link
Contributor

@bcotrim bcotrim commented Dec 24, 2025

Related issues

Proposed Changes

  • Add studio site set-xdebug <enable> command to enable/disable xdebug for a site
  • Pass xdebug configuration to the Playground CLI when starting sites
  • Respect both the beta feature flag (xdebugSupport) and per-site setting (enableXdebug)
  • Add helper function isXdebugBetaEnabled() to check the beta feature flag

Testing Instructions

  1. Enable the xdebug beta feature in Studio desktop app (Settings > Beta Features > Xdebug Support)
  2. Build the CLI: npm run cli:build
  3. Create or use an existing site: node dist/cli/main.js site create --name test-xdebug --path /tmp/xdebug-test
  4. Enable xdebug for the site: node dist/cli/main.js site set-xdebug true --path /tmp/xdebug-test
  5. Start the site: node dist/cli/main.js site start --path /tmp/xdebug-test
  6. Verify xdebug is enabled by checking the site or PM2 logs for "Enabling Xdebug support" message
  7. Test disabling: node dist/cli/main.js site set-xdebug false --path /tmp/xdebug-test
  8. Restart the site and verify xdebug is no longer enabled

Edge cases to verify:

  • Site starts normally without xdebug when beta flag is off
  • Site starts normally without xdebug when site setting is off (even if beta flag is on)
  • Error message shown when trying to enable xdebug but beta flag is off

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@bcotrim bcotrim self-assigned this Dec 24, 2025
@bcotrim bcotrim requested review from a team and fredrikekelund December 24, 2025 18:22
Copy link
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

  1. If some site has xdebux already - then everything good
    Screenshot 2025-12-29 at 14 42 10
  2. I tried to disable Xdebug in UI - everything behaves as normal, but it's not actually disabled - in UI, it's still enabled, and it's still indeed enabled. It seems we have regression.
  3. Turning on/off xdebug via cli - doesn't reflect changes in Studio, hovever terminal doesn't print errors.

Maybe it's again solely local issues, however, I removed node_modules and did everything from scratch. @bcotrim, coudl you please double-check these two points?

@bcotrim
Copy link
Contributor Author

bcotrim commented Jan 5, 2026

2. I tried to disable Xdebug in UI - everything behaves as normal, but it's not actually disabled - in UI, it's still enabled, and it's still indeed enabled. It seems we have regression.
3. Turning on/off xdebug via cli - doesn't reflect changes in Studio, hovever terminal doesn't print errors.

Thanks for the review and feedback @nightnei
I can also replicate that. There's currently an issue with site settings not updating in the UI STU-1163 that should be fixed in #2313
I believe this issue will be resolved once that PR is merged.

@nightnei
Copy link
Contributor

nightnei commented Jan 5, 2026

I believe this issue will be resolved once that PR is merged.

I see 👍 Let's merge that PR and rebase this one, and I will re-test

@bcotrim
Copy link
Contributor Author

bcotrim commented Jan 6, 2026

I see 👍 Let's merge that PR and rebase this one, and I will re-test

I updated the branch with the latest changes. Everything works for me now, can you retest please?

@bcotrim bcotrim requested a review from nightnei January 6, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants