Php debugging on Mac?

I saw these answers: debugging php on mac?

but I hope there is a better / newer solution. I am a system level developer (C / C ++ / x86), but completely new to the scripting web space. I feel that I would do a good job of setting up a robust debugging environment - this is usually a great way to get to know me.

Any suggestions / pointers to a good php debugging setup on Mac (10.6) would be appreciated.

Thanks Matt

+3
source share
3 answers

I myself am a Mac user, and since I am doing heavy PHP development, I need a complicated setup for this.

, PHP Apache, Snow Leopard, , - . , AMP, MacPorts. , . , Apache . , .

IDE - Komodo IDE. IDE xdebug. xdebug (PHP 5.3+). Eclipse + PDT, IDE, , .

PHP- apache, xdebug IDE. . - , , - , .

xdebug. , xdebug callgrind . MacCallGrind . KCacheGrind, , MacPorts ( ).

(daemonized) PHP, IPC , memcache. , .

+2

, , . xdebug NetBeans, Eclipse MacGDBp, , , .

0

, , :

1) php debug

brew install php70
brew install php70-xdebug
  • PhpStorm - Preferences = > Frameworks = > PHP Php: 7 : PHP 7.0.8 + XDebug ( [...])

  • : = > = > PHP = > = > Xdebug : 9001

2) :

php -S localhost:8080

3) localhost: 8080 PhpStorm Preferences = > Frameworks = > PHP = > : : Localhost: 8080 : localhost : 8080 : Xdebug

4) Update php.ini: Php => Interpreter => [...] => Configuration file - Open in the editor Add this section: (check the path zend_extention via cli)

[Xdebug]
zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9001 (same as in Debug preferences)

5) Add debug configuration: Run => Edit Configuration => add - Php Web Application

  • Select Localhost: 8080 Server

6) Click “Start Listening” for Php Debug Connections 7) Set Breakpoints 7) Click “Debug” (“Green Error”)

0
source

Source: https://habr.com/ru/post/1767190/


All Articles