Debugbar or clockwork are great tool. Or dd(). Or Ray (but that costs money)
Personally I also use xdebug but that is a bit tricky to set up
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
What can I use to debug my laravel framwork code? I've got data on a particular blade that I want to display on the / page, but I don't get any errors, and the data doesn't show up there. Thoughts?
Debugbar or clockwork are great tool. Or dd(). Or Ray (but that costs money)
Personally I also use xdebug but that is a bit tricky to set up
You can install the debugbar.
Awesome, thank you all for that information. I actualyl just installed Debugbar via composer, just trying to figure out now how to use it. I am reading the docs, but don't see anything yet.
@johnschroeder7 First you can explore the different tabs and see which informations are given.
@vincent15000 Thanks I wonder how to actually see the Bar, so I can look at the different tabs? I installed it without --dev as I don't have a development server, just purely production,
@johnschroeder7 The debugbar is by default hidden in production.
So you will only see it in development.
And it's not a good idea to display it in production because it will show some informations that you shouldn't show in production.
Why don't you have any development environment ? Is there any reason ?
@vincent15000 Thanks. My server is on the Cloud, and I am SSH from windows terminal to make any server side changes, and then I am using sublime for text editor to SSH into make changes to the website, and then Filezilla to SFTP into the server because sometimes if I move files or delete directories, etc via Sublime, it gets all jacked up. In addition to that MySQL is running on the Server, so I say all that to say. Not sure if I ran a "development" environment on my localhost is possible since the database is on remote server.
@johnschroeder7 It's not so secure to work like this.
You should retrieve your code on your local machine and do all changes locally, so that you can test the code locally before sending it in production.
Very easy to do with Laragon on Windows.
Are you working with a repository like github ?
@vincent15000 Great! Thank you. Yes I am a member of github.
@johnschroeder7 I assume there are no users on the site then? If you make the smallest typo or mistake the site breaks in production
@Sinnbeck That is correct, except there is a login page. and it works and I can login. There is some data that is displayed on the /home page when I am logged in. I totally get what you mean by a single typeo that that it breaks. So this one has me really trying to figure it out, as I want to display some of that data from the /home on the / page.
@johnschroeder7 Why don't you start by showing us your routes file, and then the controller that you are supposed to hit.
@johnschroeder7 I worked the same way you are when I first started out. But I can highly recommend getting a local environment set up. It is just sooo much nicer, and when you someday get other users you already have a proper set up
@Tray2 Thanks. Below is the routes page. As far as the controller goes, just trying to understand why a controller would be need, or perhaps it needs to be modified in the first get route below?
routes/web.php
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
Auth::routes(['register' => false]);
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::resource('bookmarks', App\Http\Controllers\Admin\BookmarksController::class);
@Sinnbeck Thank you, I've already installed Laragon, wow, it does look like this is going to be much easier...
@johnschroeder7 Yeah, Laragon is great ;).
@johnschroeder7 What's the problem you have with these routes ?
@johnschroeder7 And which url are you having issues with?
Show us the controller as well.
@johnschroeder7 Thank you but can you explain the problem you encounter ?
@vincent15000 Sure. When I log in, and at my home page 'home' it shows these 4 titles that have some data. So when I copy that small same code and insert it at my 'welcome' page, being the welcome.blade.php file it does not display that data nor throw me an error code.
@johnschroeder7 Why are you using extends('layout') in the middle of the welcome view ?
Either you extend a view from a layout (best pratice) or you write the entire page, but don't mix both.
@vincent15000 Just trying to pull that same data that is on the home.blade.php file, and that is the way it was written.
@johnschroeder7 --- that is the way it was written --- what do you mean ?
@johnschroeder7 Do you know this serie ?
https://laracasts.com/series/laravel-8-from-scratch
It's a very good tutorial and it would help you write a good code ;).
@vincent15000 I had a developer create the site, for a project I was working on. He set it all up. Then I stopped the project, for 3 months. So I started the project again, and basically had to restore it. Now that I got it restored, trying to customize some things on it, while I await to hear back from him on a later date if he's still interested in doing more work on it.
@vincent15000 Yes, sounds good. I took a look at that, but it didn't cover this issue I am having. I recall it covering and talking about two different ways to do blades, but none of that seemed to help just yet.
@johnschroeder7 I don't know the context, but it's a not a good idea to code the site if you don't have any minimum knowledge about Laravel.
Following the tutorial I suggested you will take you some hours and then you will be able to customize some parts of the site.
@vincent15000 I figured the answer if you would like to know.
@johnschroeder7 Which answer ? About your display problem ?
@vincent15000 Lol, yes. It actually did work, the code was fine, but it was at the bottom of the homepage. So, now I get it what you mean by why did I have extends('layout') in the middle of the page. I'll have to watch the laravel videos and figure out how to get that straighen out. At least, now I know when I didn't get any error codes, it was in fact working. The debug tool also showed on my browser after hitting refresh, but it didn't even really clue me in on what was wrong, because there was no code error... So consider this topic resolved.
@johnschroeder7 If you consider this topic resolved, please close the post by assgning the best answer to the answer that best helped you.
Please or to participate in this conversation.