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 thousands of developers

Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

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]

Symfony now has an improved dump function

by Freek Van der Herten – 2 minute read

Let's talk a little bit about Symfony's dump function. It's part of their VarDumper component. The function can dump a variable to the screen or browser in a nicer format than PHP's native var_dump. In the recently released Symfony 3.4 and Symfony 4 the function got a nice little improvement that…

Read more

Setting up Xdebug with Laravel Valet

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

A better dd() for your TDD

On the Tighten blog Keith Damiani wrote an article how you can mold the dd helper to your liking.

An important part of every Laravel developer's debugging arsenal is the humble dd() helper function—"dump and die"—to output the contents of a variable and terminate execution of your code. In the browser, dd() results in a structured, easy-to-read tree, complete with little arrow buttons that can be clicked to expand or hide children of nested structures. In the terminal, however, it's a different story. ... Fortunately, it's simple to build your very own customized version of dd() to help tame your unwieldly terminal output.

https://blog.tighten.co/a-better-dd-for-your-tdd

Read more

Beyond Console Debugging Tricks

Daniel Reis shows some alternatives for the best known form of debugging JavaScript console.log.

I don’t consider myself a nitpicker. That’s only true, and it’s all fine and dandy… until I find a console.log() that someone forgot to remove from the JavaScript code. And if we’re talking about debugger statements… all hell breaks loose! ... I collected some of the most common examples I can present as proper alternatives for that process.

https://medium.com/outsystems-experts/beyond-console-debugging-tricks-f7d0d7f5df4

Read more