corestack_ php_ xdebug_ set
Set up Xdebug.
When to use it
Turn Xdebug on (with its modes, start_with_request and IDE key) or off on a non-production row, at corestack_php_runtime_get's version; now or tonight.
Ask for it
Using the Corefinity MCP server, call corestack_php_xdebug_set with site_id 4212, enabled true, mode ["debug"], start_with_request trigger, idekey PHPSTORM, version 3. (Set up Xdebug.) Tell me what it returned.Inputs
applystring
now (the default), or tonight in the row's maintenance window. window: the row's next maintenance window (tonight is kept as its alias). Defaults to now.
nowwindowtonightenabledbooleanRequired
true turns debugging on with mode; false turns it off.
idekeystring
The IDE key; PHPSTORM when left out.
modearray of strings
xdebug.mode, one or more, e.g. ["debug"]; needed when enabled. Up to 6 items.
developcoveragedebuggcstatsprofiletracesite_idintegerRequired
The row: a non-production site or environment. At least 1.
start_with_requeststring
trigger (the default) or yes.
triggeryesversionintegerRequired
corestack_php_runtime_get's version: a change made since is refused stale. At least 0.
Example call
{
"name": "corestack_php_xdebug_set",
"arguments": {
"site_id": 4212,
"enabled": true,
"mode": [
"debug"
],
"start_with_request": "trigger",
"idekey": "PHPSTORM",
"version": 3
}
}If it is refused
| Reason | What to do |
|---|---|
invalid_arguments | Xdebug is for non-production rows only (details.errors lists {field, code, message}; the entry for enabled carries non_production_only), or mode is empty or names a mode twice. |
stale | The row's PHP configuration changed since you read it; read corestack_php_runtime_get again and call with its new version. |
runtime_locked | Corefinity has locked this row's PHP configuration, so nothing was changed; tell the person (Corefinity support can unlock it). |
managed_elsewhere | Another control panel manages this row; change it there. |
switched_off | The exec kill switch is off, which also stops every PHP change on a row already on the new runtime; stop and tell the person. |
feature_off | apply: "tonight" needs the maintenance window queue, which is switched off; leave apply out to make the change now. |
batch_window | This change can only apply inside this row's maintenance window, or other maintenance is already queued for it; call again with apply: "tonight". |
change_pending | A change is already queued for this row's maintenance window; apply or cancel it first (corestack_pending_changes_list). |
runtime_not_adopted | The row is not on the new runtime yet and cannot move onto it with this save (details.adoption says why); try again once corestack_runtime_get shows it can adopt. |
conflict | The row's PHP files were changed outside the Control Panel, and Corefinity staff review them before the next change; nothing was changed; tell the person. |
removed | The row has been removed. |
deleted | The site is deleted (in its grace period); restore it with corestack_site_restore_deleted first. |
provisioning | The site is still being created; wait for corestack_site_provisioning_get to finish. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |
The same task elsewhere
Was this helpful?