How to debug Laravel structure?

I am a PHP programmer programmer who now casts a glance at the framework, and among them are Laravel sounds attractive to me as newbies (somehow, unfortunately, because I already invested in Zend 2 literature). However, debugging is important to me, and from what I can find on the network, Laravel is hard to debug. I am currently using Xdebug in Netbeans in my own PHP code and wondering if it is possible to debug Laravel in the same way? When I open a new Netbeans project, I can choose Symfony 2 or Zend 2, but there seems to be really no support for other frameworks like Laravel? If not, is there at least an equivalent debugging tool?

+10
source share
5 answers

Laravel has its own debugging system. You can use the built-in dd () function. And there are several packages that you can use to debug laravel projects. Here are some links and hope it will be useful for you.

https://github.com/barryvdh/laravel-debugbar

http://laravel.io/forum/02-04-2014-package-laravel-debugbar

thanks

+8
source

There is also a Google Chrome extension for the "PHP Console" extension for Laravel https://github.com/barbushin/php-console-laravel

+2
source

Recently, I came to the opening of this amazing plugin that allows you to reset variables, trace requests, runtimes, views, controllers, queries, profile memory, runtime, etc., everything related to the current page being displayed. Very useful:

https://laravel-news.com/laravel-debugbar

You can install it through the composer:

composer require barryvdh/laravel-debugbar --dev 

Then add it to the array of service providers in /config/app.php

Debugbar will start working immediately if debugging mode is turned on: for this you just need to change the .env file in config/app.php or debug_mode to true ,

If you want to use dump methods in the debugbar console, you need to include the alias in the /config/app.php array:

 'Debugbar' => Barryvdh\Debugbar\Facade::class, 

Now you can start resetting variables as follows:

 \Debugbar::info($variable); 

Pretty cool plugin. Hooray!

+2
source
+2
source

You can use a reflux condenser. The debugger runs in the terminal.

Really easy to use and works like a beebug in a ruby. https://github.com/tacnoman/dephpugger

0
source

Source: https://habr.com/ru/post/970024/


All Articles