I'm using PHP 7.3.1 with Laravel 5.7.
How can I proceed to debug step by step without install a external server? Using Xdebug?
Just running with the command:
php artisan serve
All solution then I founded use WAMP.
Setup xdebug extension in php.ini file as per your PHP version.
Check which version of xdebug support your PHP here : https://xdebug.org/wizard.php
Don't forget to change your xdebug extension path zend_extension
.
Add xdebug extension into the browser also. For mozila click here.
[xdebug]
zend_extension = "C:\php\ext\php_xdebug-2.7.0-7.2-vc15.dll"
xdebug.remote_autostart = 1
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 0
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "c:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
;xdebug.remote_handler = "dbgp"
;xdebug.remote_host = "127.0.0.1"
;xdebug.remote_log = "c:\xampp\tmp\xdebug.txt"
;xdebug.remote_port = 9000
;xdebug.trace_output_dir = "c:\xampp\tmp"
;36000 = 10h
;xdebug.remote_cookie_expire_time = 36000
;xdebug.trace_output_dir = "C:\xampp\tmp"
I'd try starting artisan with Xdebug like php -z /path/to/xdebug.so artisan serve
.
And then use the PHP debug extension for Visual Studio code, to set breakpoints, inspect variables and all other debugging stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With