我无法让xdebug在Ubuntu 12.10和PHP5.4下运行PhpStorm在我看来,一切都已启用,但IDE不会在断点处停止.以下是相关参数.
有人可以查看参数,看看我缺少什么?我想知道xdebug.remote_enable是否需要打开.我正在调试本地文件.服务器根目录和项目路径是相同的.
如果我确实需要更改PHP54 xdebug参数,那么我在ubuntu中这样做了吗?
我将以下内容添加到/etc/php5/apache2/php.ini,重新启动了apache,但它们似乎被忽略了.
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
php – 我输出
/etc/php5/cli/conf.d/20-xdebug.ini
xdebug
xdebug support => enabled
xdebug.auto_trace => Off => Off
xdebug.cli_color => 0 => 0
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 0 => 0
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.coverage_enable => On => On
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.file_link_format => no value => no value
xdebug.idekey => no value => no value
xdebug.max_nesting_level => 100 => 100
xdebug.overload_var_dump => On => On
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_connect_back => Off => Off
xdebug.remote_cookie_expire_time => 3600 => 3600
xdebug.remote_enable => Off => Off
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => localhost => localhost
xdebug.remote_log => no value => no value
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.scream => Off => Off
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => Off => Off
xdebug.trace_enable_trigger => 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
解决方法:
命令行上的“php -i”使用与apache不同的php.ini文件(/etc/php5/cli/php.ini)(/etc/php5/apache2/php.ini).确保通过浏览器检查phpinfo()以查看是否已设置xdebug.remote_enable. phpinfo()输出还告诉您已加载了哪些INI文件,因此也请检查.
但一般情况下,对于扩展,您希望将扩展的配置文件放在/ etc / php5 / mods-available中 – 在这种情况下,您只需创建/etc/php5/mods-available/xdebug.ini:
xdebug.remote_enable=1
在里面.所有其他设置应保持不变(因为它们无论如何都是默认值).