Advanced Tokaido
Using Xdebug
Tokaido offers first-class support for using PHP Xdebug in the FPM environment. Unfortunately we are not able to support running Xdebug in the SSH/Drush container at this time, but if this is something you'd like then please let us know.
Warning
Please be aware that Xdebug has a noticeable impact on performance, even when there is no remote editor like VS Code listening for and debugging the connection. This is why we disable Xdebug support by default. If you aren't actively using Xdebug, we recommend turning it off.Enabling Xdebug
To enable Xdebug you can run the following command from your project root:
tok config-set global project xdebug enabled true
By default this will set Xdebug to send traffic back to your host on port 9000. You can change the xdebug port per-project by running:
tok config-set global project xdebug fpmport {port-number}
If you want to disable Xdebug, simply run:
tok config-set global project xdebug enabled false
Info
Each time you run `tok config-set` you need to run `tok rebuild` to refresh your Tokaido environment's running configuration{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/tokaido/site": "/path/to/your/repo"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000,
"pathMappings": {
"/tokaido/site": "/path/to/your/repo"
}
}
]
}