Posts tagged with debug

Become a debugging wizard with RAY

youtu.be - submitted by Bert De Swaef

In this video we're learning how to use Ray to debug your projects. Weither your working with Laravel, PHP, Javascript or some other programming language, Ray is there for you.

Debugging your project was made easy by the guys over at Spatie. They designed and developed a debugging tool for us, called Ray. Available at https://myray.app

Read more [youtu.be]

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Viewing model counts in the Laravel Debugbar

reinink.ca

Jonathan Reinink has added a very usefull metric to Laravel debugbar

Last week at Laracon US I gave a talk titled Eloquent Performance Patterns. In that talk I used a custom Laravel Debugbar metric I created to track how many Eloquent models were being hydrated throughout a request. I've had a lot of people asking about this, so today I submitted a pull request to the Laravel Debugbar to add this as an official metric.

Read more [reinink.ca]

Find Segfaults in PHP like a boss

jolicode.com

Grégoire Pineau explains how you can find the source of a segfault in PHP.

Sometimes, a segfault happens, but you don’t know where, and your PHP installation does not have tools to find it. Or sometime, you think PHP is hanging, but you don’t know where. You may use xdebug, but you don’t want to click so many times on the « next call » button.

Read more [jolicode.com]

A PHP debugger written in PHP

blog.krakjoe.ninja

Joe Watkins, core PHP developer and author of (amongst many other things) ptrheads, is busy creating a PHP debugger written in PHP that you can just composer require.

This isn't just pipe dreams, the PHP code exists, it's alpha quality and largely untested ...There is much to do and you shouldn't design your workflow around this (or any alpha quality software) yet. What you should do is start reading code, testing, and opening pull requests...

You'll find the code of Joe's debugger in this repo on GitHub.

Read more [blog.krakjoe.ninja]

Debugging the dreaded "Class log does not exist" error in Laravel

My colleague Sebastian took the time to write down the solution to a problem many artisans will come across at some point in time. I hope that in a future version of Laravel that error message will be improved so that it makes clear what the actual problem really is.

Every now and then I come across a Class log does not exist exception in Laravel. This particular exception is thrown when something goes wrong really early in the application, before the exception handler is instantiated.

Whenever I come across this issue I'm stumped. Mostly it's related to an invalid configuration issue or an early service provider that throws an exception. I always forget how to debug this, so it's time to document my solution for tracking down the underlying error.

https://sebastiandedeyne.com/posts/2017/debugging-the-dreaded-class-log-does-not-exist-error-in-laravel

Read more

Introducing Clockwork 2.0

Clockwork is Laravel package, made by itsgoingd, that can collect a lot of helpful info such as queries executed, views loaded, route used, ... Unlike the popular laravel-debugbar package, Clockwork will not inject extra stuff into the html itself. All collected info is displayed in the developer tools of your browser (you'll need to install an extension first).

https://underground.works/blog/introducing-clockwork-2.0

Read more

Setting up Xdebug with Laravel Valet original

by Freek Van der Herten – 4 minute read

On most of my day to day work I use Laravel Valet to develop locally. When hitting a bug often I just put a dd() statement in the code to quickly inspect what's going on. But when encountering a complex bug this becomes tedious. Wouldn't it be nice if we could add a breakpoint to our code and be…

Read more

Configuring and using Xdebug locally in PhpStorm

Pedro Sanchez wrote a good guide on how to get started with Xdebug in PhpStorm.

We assume that you use PHPStorm on a daily basis, and this guide will help to debug your code locally using the IDE. A remote debugging guide will come in the future.

http://tech.mybuilder.com/phpstorm-configuring-and-using-xdebug/

Read more

Find out where a query is executed in a Laravel app

The Query Tracer package can help you find out where a specific database query is being called. It works with both Clockwork and the Laravel Debugbar. Here's a screenshot taken from the readme:

687474703a2f2f692e696d6775722e636f6d2f644b6d383253322e706e67

https://github.com/fitztrev/query-tracer

EDIT: turns out that Laravel Debugbar can do this out of the box:

https://twitter.com/barryvdh/status/732570607058046977

Read more