Friday, December 24, 2021

HOW TO ON DEBUGGING IN MAMP USING VISUAL CODE STUDIO IN MAC

 Step 1: Install the PHP Debug in the visual code studio.


Step 2: Now goto path

=>  /Applications/MAMP/conf/php[version]/php.ini


In that path add the file

NOTE: default zend_extension is commented then uncommet the extension. 


     zend_extension="/Applications/MAMP/bin/php/php7.4.21/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so"

      xdebug.remote_autostart=1

      xdebug.remote_enable=1

      xdebug.remote_host=localhost

      xdebug.remote_port=9000

      xdebug.remote_handler=dbgp


Step 3: Now we can added the another configuration. 

=> Applications/MAMP/bin/php/php[version]/conf/php.ini

Same code put

zend_extension="/Applications/MAMP/bin/php/php7.4.21/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so"

       xdebug.remote_autostart=1

      xdebug.remote_enable=1

      xdebug.remote_host=localhost

      xdebug.remote_port=9000

      xdebug.remote_handler=dbgp

Step 4: restart the apache server 

=>sudo /Applications/MAMP/bin/stopApache.sh => stop the server

=>sudo /Applications/MAMP/bin/startApache.sh => start the server

No comments:

Post a Comment

If you have any problem please let me know.