I just received my new MacBook Pro 16 inch with M1 CPU. Everything runs fine, but Debug gives me headaches.
For local (PHP) development I am using MAMP and doing so also installs Xdebug. Normally I also change Xdebug settings like so:
Files to change:
/Applications/MAMP/conf/php[version]/php.ini
/Applications/MAMP/bin/php/php[version]/conf/php.ini
- Locate the xdebug section at the bottom of both of these files
- Uncomment
zend_extensionline in both files (remove the;) - Add the following lines to the xdebug section in both files:
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1 # Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
Gotten from here: https://joshbuchea.com/mac-enable-xdebug-in-mamp
For Visual Studio Code I use these settings:
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
}
Has always worked 100% on an Intel chip. Now, with the M1, it doesn't. Press F5 so the debugger starts, but no stops at breakpoints occur.
The problem for me is that googling this tells me *) that the chip architecture doesn't match (x86/M1) and that I need to use pecl and such (bit new to this). But I'm using MAMP, which has already installed Xdebug.
Does anyone know how to fix this and help me get Xdebug up and running?
Development without debugging doesn't work...