cupok's avatar

Debugging

Hi, do you guys have course about debugging PHP or JS? Would be nice to have otherwise!

0 likes
5 replies
LaryAI's avatar
Level 58
While Laracasts does not have a dedicated full-length course solely on debugging PHP or JavaScript as of now, debugging techniques are covered in various lessons throughout the site—especially in courses focused on Laravel and modern JavaScript development. 

For PHP/Laravel:
- Check out the "Laravel From Scratch" series, which covers common debugging tactics using tools like Xdebug, Laravel Telescope, and more.
- The "What's New in Laravel" and "Laravel Debugbar" snippets also often include useful debugging content.

For JavaScript:
- The "Modern JavaScript Explained For Dinosaurs" and various Vue/React courses touch on practical debugging using browser dev tools, breakpoints, and logging.

**Tip:** To quickly get better at debugging, it helps to:
- Use IDE features (like Xdebug for PHP in PhpStorm or VS Code).
- Leverage browser dev tools (Chrome/Firefox) for JavaScript debugging.
- Get comfortable reading stack traces and error logs.

If there's a specific debugging scenario or tool you'd like covered, you can suggest it in the Laracasts "Request a Series" forum—Jeffrey and the team are always looking for feedback!

If you need immediate help with debugging, feel free to post your specific code/problem, and the community won't hesitate to help!
1 like
kevinbui's avatar

I am mostly a backend developer, I don't know about debugging Javascript.

I believe this latest course is the only one about debugging PHP in Laracasts: https://laracasts.com/series/debugging-real-world-production-nightmares

In my day job, I gotta debug regularly, just like everyone else. We log a lot to AWS Cloudwatch, and we mostly gotta look at the logs to find out what happen. Context has been wildly helpful, we put the request id, order id and session id to the context to see the whole customer journey.

Tools like Datadog, NewRelic and Laravel Nightwatch are also popular.

1 like
cupok's avatar

Thanks! Actually, I meant something more like Xdebug or browser console debugging tools.

wordxpression's avatar

Thanks! Actually, I meant something more like Xdebug or browser console debugging tools.

Actually, Xdebug is rather low-level and time-consuming when used for Laravel debugging. Both the dump/dd debug function in Herd and the Ray debugger are far more efficient and effective debugging Laravel apps.

Also the right choice of editor (I used to use Visual Code, now evaluating PHPStorm) can prevent a lot of potential errors.

1 like

Please or to participate in this conversation.