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
64
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
63
REST API Development
masnun
0
110
Golang For Scalable Systems
masnun
0
100
Email Validation using SMTP
masnun
0
78
Let's Get Going!
masnun
0
120
How to be Successful in Outsourcing
masnun
1
120
Other Decks in Programming
See All in Programming
return文におけるstd::moveについて
onihusube
1
1.3k
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.2k
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.9k
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
220
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
190
Spatial Rendering for Apple Vision Pro
warrenm
0
290
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
6
1.3k
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
210
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
380
快速入門可觀測性
blueswen
0
460
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
110
Recoilを剥がしている話
kirik
5
7.9k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
34
1.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
480
Optimising Largest Contentful Paint
csswizardry
33
3k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Code Review Best Practice
trishagee
65
17k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The Invisible Side of Design
smashingmag
299
50k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
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