Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Power Debugging & Profiling Your PHP Apps
Search
Abu Ashraf Masnun
January 12, 2023
Programming
0
69
Power Debugging & Profiling Your PHP Apps
Abu Ashraf Masnun
January 12, 2023
Tweet
Share
More Decks by Abu Ashraf Masnun
See All by Abu Ashraf Masnun
Background Task Processing in Celery
masnun
1
67
REST API Development
masnun
0
150
Golang For Scalable Systems
masnun
0
130
Email Validation using SMTP
masnun
0
83
Let's Get Going!
masnun
0
120
How to be Successful in Outsourcing
masnun
1
120
Other Decks in Programming
See All in Programming
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
260
テスト駆動Kaggle
isax1015
1
870
Workers を定期実行する方法は一つじゃない
rokuosan
0
130
中級グラフィックス入門~効率的なメッシュレット描画~
projectasura
2
1.2k
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
690
「次に何を学べばいいか分からない」あなたへ──若手エンジニアのための学習地図
panda_program
3
630
QA x AIエコシステム段階構築作戦
osu
0
130
ソフトウェア設計とAI技術の活用
masuda220
PRO
25
6.7k
Claude Code で Astro blog を Pages から Workers へ移行してみた
codehex
0
140
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
1.2k
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
4
1.4k
20250708_JAWS_opscdk
takuyay0ne
2
150
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
RailsConf 2023
tenderlove
30
1.2k
Visualization
eitanlees
146
16k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
GraphQLとの向き合い方2022年版
quramy
49
14k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Speed Design
sergeychernyshev
32
1k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Transcript
Power Debugging & Profiling Your PHP Apps Abu
Ashraf Masnun
WHAT’S YOUR STORY? Let’s share experiences!
Error Display • Turn on error display
• Report all errors • E_ALL | E_STRICT • Don’t ignore those “NoKce” messages
Print & Die • Output something and then terminate
the script. • var_dump() • print_r() • Output buffering for cleaner output • debug_backtrace()
Logging • Use a logging library (Monolog, anyone?)
• error_log() • mod_php sets stderr to apache logs: – file_put_contents('php://stderr', print_r($foo, TRUE)) • trigger_error() & set_error_handler() Tail your logs: tail -‐f your_log_file_path
InteresKng Tools • FirePHP, Chrome Logger • Kint,
PHP Debug Bar
THE MOTHER OF ALL DEBUGGER Let’s meet
ConfiguraKon
Netbeans
Netbeans
Netbeans
PROFILING LIKE A PRO
Start Profiling
The Cachegrind Files
Using Webgrind
@MASNUN Feel free to reach out: hap://masnun.me