Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dmarman's avatar

Simple tool for checking session variables.

After a few months working with a complex routing involving session variables, I found out there is not a nice way to keep track of your session variables while developing/debugging.

var_dump() it is not really pretty and dd() just blocks the hole app.

I wrote a simple tool I use myself to watch what is going on in the session when I needed. I also add a few functionalities. I can display the data inside the dom or inside the console.

At first I thought to implemente it using JS, then PHP and finally I wrap it all in a blade file. I know it could be much polished if I put it as a Laravel package, but I think it is too much hustle for what the tool does.

I put some time to write a little documentation on git hub. Let me know what you think and it would you useful for somebody!

https://github.com/dmarman/laravel-session-print

0 likes
3 replies
dmarman's avatar

I didn't know it! I've been looking for something similar, but couldn't find it. Thanks for sharing it, I will try it for sure!

Snapey's avatar

shame to say, i've been using Laravel since 4.2 and only just found out that there is a dump() helper that provides a nice collapsed view and unlike dd does not halt execution.

Please or to participate in this conversation.