If you are using a local php version from homebrew or use Valet to set multiple php versions, with this command you would get exactly the current version. You would get four values, the second line returns the php.ini file location, with this you can open a text editor and add xdebug.