php-laravelHow do I configure Xdebug in the php.ini file for a Laravel project?
In order to configure Xdebug in the php.ini file for a Laravel project, the following steps should be taken:
- Add the Xdebug extension to your php.ini file:
zend_extension = <path-to-xdebug>/xdebug.so
- Configure the Xdebug settings in the php.ini file:
xdebug.remote_enable = 1
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
- Configure the Xdebug settings for your Laravel project:
xdebug.max_nesting_level = 256
xdebug.idekey = "your-ide-key"
-
Restart your web server to apply the changes.
-
Test the Xdebug configuration with the following command:
php -i | grep xdebug
The output should look like this:
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 => your-ide-key => your-ide-key
xdebug.max_nesting_level => 256 => 256
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 => On => On
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => 127.0.0.1 => 127.0.0.1
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
Helpful links
More of Php Laravel
- ¿Cómo configurar PHP y Laravel desde cero?
- How do I install Laravel using XAMPP and PHP?
- How do I set up a .gitlab-ci.yml file for a Laravel project using PHP?
- How can I use the @yield directive in PHP Laravel?
- How can I use React with PHP Laravel?
- How can I use PHP, Laravel, and Vue together to create a web application?
- How can I use Laravel Dusk to test my PHP application?
- How do I upload a file using PHP and Laravel?
- How do I set up a Laravel HasMany relationship using PHP?
- How do I use the chunk method in Laravel with PHP?
See more codes...