2

私は今、xDebug(2.0.5をソースからコンパイル)をNetBeans6.8を搭載したMacBookOSXで動作させるために何時間も試しました。MAMPをインストールし、それを使用して小さなPHP(5.2)テストプログラムを実行しています。問題ありません。しかし、デバッグしようとすると、Netbeansに「接続を待機しています(netbeans-xdebug)」というテキストが表示され、それ以上何も起こりません。Netbeansはデバッガポート9000用に設定されています。MAMPにZend最適化はありません。

私はこれに従いました:http://netbeans.org/kb/docs/php/configure-php-environment-mac-os.html#installEnableXdebug およびhttp://www.xdebug.org/docs/install およびhttp:/ /forums.netbeans.org/topic1513-0-asc-0.htmlなど

これが私のphp.iniの一部です

[XDebug]

;zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"

;[Zend]

;zend_optimizer.optimization_level=15

;zend_extension_manager.optimizer=/Applications/MAMP/bin/php5/zend/lib/Optimizer-3.3.9

;zend_optimizer.version=3.3.9

; Xdebug config for Mac OS X and NetBeans IDE

zend_extension=/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so

xdebug.remote_enable=1

xdebug.remote_handler=dbgp

xdebug.remote_mode=req

xdebug.remote_host=localhost

xdebug.remote_port=9000

xdebug.idekey="netbeans-xdebug"

私は多くのインストール手順などを読みましたが、phpinfoは、xDebugがV.5.2.11として正常にインストールされていることを示しています(MAMPの「OpenStartPage」から表示)。ただし、ターミナルPHP -miで試してみると、xdebugがリストされていません。私はついにPHP.INIが/etcから読み取られることを理解したので、そこでMAMP php.iniをphp.iniにコピーし、xdebug.se、localhost、ポート9000などの情報をそこに追加しました。その後、PHP -mを実行するとxdebugが表示されますが、それでもNetBeansの問題が発生します。奇妙なことに、php -iはバージョン5.2.10を示していますが、上記の5.2.11ではありません。

また、これを試し、idekeyに「netbeans-xdebug」を追加しました。xdebugがNetBeansとの接続を確立しないのはなぜですか。

PHP_INFO()が私のPHP.INIファイルを../MAMP/...の下で見つけたように見えたのに、/etcから読み取ったときにPMP-mを実行したときではなかったのはなぜですか?

PHPが常にMAMPの下でINIファイルを見つけるようにするには、PHPINFO()とPHP -mを機能させるために2つのPHP.INIファイルを使用する必要がないようにするにはどうすればよいですか?

xDebugが正しくインストールされているように見えても、NetBeansでまだ機能していないので、NetBeansの問題を解決するにはどうすればよいですか。デュアルphp.iniが必要なことはありますか?xdebugを間違ってコンパイルした可能性がありますか?xdebug / phpのphpバージョンで何か?確認方法は?

php-iの結果の一部を次に示します。

xdebug

xdebug support => enabled
Version => 2.0.4

Supported protocols => Revision
DBGp - Common DeBuGger Protocol => $Revision: 1.125.2.6 $
GDB - GNU Debugger protocol => $Revision: 1.87 $
PHP3 - PHP 3 Debugger protocol => $Revision: 1.22 $

Directive => Local Value => Master Value
xdebug.auto_trace => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 0 => 0
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.default_enable => On => On
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.extended_info => On => On
xdebug.idekey => pettermagnusson => netbeans-xdebug
xdebug.manual_url => http://www.php.net => http://www.php.net
xdebug.max_nesting_level => 100 => 100
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => Off => Off
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => /tmp => /tmp
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => Off => Off
xdebug.remote_enable => On => On
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => 127.0.0.1 => 127.0.0.1
xdebug.remote_log => /tmp/xdebug.log => /tmp/xdebug.log
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => Off => Off
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => /tmp => /tmp
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3

Rgds PM

4

4 に答える 4

3
How come PHP_INFO() seemed to find my PHP.INI file under ../MAMP/... and not when doing PMP -m when it is read from /etc ?

phpinfo()CLIはOSのバイナリを使用しますが、MAMPのPHPバイナリを使用します。

How can I get PHP to always find the INI file under MAMP so I dont have to use two PHP.INI files to et PHPINFO() and PHP -m to work?

OS PHPはそのままにして、アップグレードに問題がないようにし、必要に応じてMAMPでバブルされたものを微調整します。

How can I resolve the NetBeans problem now that xDebug seems to be installed correctly but still not working in NetBeans? Something with this need for dual php.ini? Could I have compiled xdebug wrong, how to know? Something with php versions in xdebug / php? How to check?

コンパイルされたxdebug拡張機能を含む最新バージョンのMAMPをダウンロードし、これをに追加しますphp.ini

zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_enable=1
xdebug.idekey="netbeans-xdebug"
xdebug.remote_log="/Applications/MAMP/logs/xdebug.log"

OSXがデフォルトを好まないようであるため、私はポート9001を使用します。

于 2011-10-22T06:24:34.027 に答える
0

Komodoから間違ったxDebug.soをダウンロードしましたが、どういうわけか自分のビルドも良くありませんでした。もう一度ダウンロードして、今はOKです。うわー、これは私に何時間もかかりました、そして誰も助けることができませんでした!/ PM

于 2010-01-06T14:03:04.147 に答える
0

すべての設定とセットアップ手順を確認して再確認しましたが、それでもXDebugが機能していないように見えました。結局、Macを再起動すると、魔法のように動作し始めました。多分これは私と同じ立場の誰かを助けるでしょう。

于 2013-05-22T11:18:15.003 に答える
0

これは私のために働いているものです

brew install php55-xdebug

  • iniパスを取得し、最後に以下を貼り付けます
    php -i | grep 'Configuration File'
    vim /usr/local/etc/php/5.5/php.ini

  • 以下を追加します

    zend_extension = "/ usr / lib / php / extends / no-debug-non-zts-20100525 / xdebug.so"

    xdebug.default_enable = 1
    xdebug.remote_enable = 1
    xdebug.remote_handler = dbgp
    xdebug.remote_host = localhost
    xdebug.remote_port = 9001
    xdebug.remote_autostart = 1

于 2014-10-14T09:18:49.820 に答える