Waiting For Connection (netbeans-xdebug) MAMP OS X

后端 未结 4 476
南旧
南旧 2021-02-06 03:45

Preamble

After many hours, I have been unable to get NetBeans to connect to xdebug. Some months ago, after upgrading from an old version of MAMP to MAMP

相关标签:
4条回答
  • 2021-02-06 04:22

    Xdebug will only connect if there is an index.php file in your project folder, so check to make sure you have one.

    0 讨论(0)
  • 2021-02-06 04:24

    I asked the same thing and got this quite good answer: How to track execution time of each line / block of lines / methods in PHP?, beside that i have this answer also on a currently running other question with the same content.

    Some additional notes on that (stuff i've collected in other SO posts in my own research with this problem):

    1. The port might be also 9001 (seems to work for some people while 9000 don't).
    2. Switching to PHPStorm IDE is a real alternative that solves this problem (as PHPStorm has included perfectly running xdebug already).
    3. Download a new version of xdebug via the wizard (http://xdebug.org/wizard.php) and if you follow the instructions maybe you will be lucky.
    4. Switching off the firewall might help.
    5. Add to php.ini: xdebug.idekey=netbeans-xdebug.
    6. Find out if you have a xdebug.ini file and add the xdebug related php.ini lines to that file.
    7. you have to un-comment the zend_extension line (i.e. remove the ; at its begninning), so Xdebug is actually loaded.
    8. make sure Xdebug is loaded, calling phpinfo() from a PHP file (just to be sure).
    0 讨论(0)
  • 2021-02-06 04:24

    On clean download and install of netbeans working on xampp, xdebug worked except would not stop at breakpoints. Changed php.ini to: xdebug.remote_enable = 1 (from 0) and xdebug worked as expected!

    0 讨论(0)
  • 2021-02-06 04:35

    it works for me now. I have LAMP installed. I modified according to all answers from above, started apache2 and now it flies... i am happy... for some time i thought to switch to phpstorm, but I reconsidered... tweak a little more... et voila. it's working.

    Here what I have in php.ini

    zend_extension = /usr/lib/php5/20121212/xdebug.so
    
    xdebug.max_nesting_level = 250
    xdebug.auto_trace=On
    xdebug.remote_enable=On
    xdebug.remote_port=9001
    xdebug.remote_handler=dbgp
    xdebug.remote_host=localhost
    xdebug.remote_log="/var/log/xdebug.log"
    xdebug.trace_output_dir=/var/www/AMRO
    xdebug.idekey="netbeans-xdebug"
    
    0 讨论(0)
提交回复
热议问题