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
75
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
70
REST API Development
masnun
0
170
Golang For Scalable Systems
masnun
0
150
Email Validation using SMTP
masnun
0
88
Let's Get Going!
masnun
0
130
How to be Successful in Outsourcing
masnun
1
130
Other Decks in Programming
See All in Programming
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
120
オブザーバビリティ駆動開発って実際どうなの?
yohfee
2
630
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
190
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
3
430
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
130
Event Storming
hschwentner
3
1.3k
CSC307 Lecture 12
javiergs
PRO
0
450
Beyond the Basics: Signal Forms
manfredsteyer
PRO
0
110
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
110
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
370
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
180
CSC307 Lecture 13
javiergs
PRO
0
310
Featured
See All Featured
Amusing Abliteration
ianozsvald
0
120
What's in a price? How to price your products and services
michaelherold
247
13k
We Have a Design System, Now What?
morganepeng
55
8k
Mobile First: as difficult as doing things right
swwweet
225
10k
Leo the Paperboy
mayatellez
4
1.5k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
WCS-LA-2024
lcolladotor
0
470
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
380
Between Models and Reality
mayunak
1
210
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Chasing Engaging Ingredients in Design
codingconduct
0
130
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