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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Abu Ashraf Masnun
January 12, 2023
Programming
0
74
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
140
Email Validation using SMTP
masnun
0
87
Let's Get Going!
masnun
0
130
How to be Successful in Outsourcing
masnun
1
130
Other Decks in Programming
See All in Programming
AI巻き込み型コードレビューのススメ
nealle
1
160
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
Fluid Templating in TYPO3 14
s2b
0
130
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
CSC307 Lecture 01
javiergs
PRO
0
690
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
160
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.4k
CSC307 Lecture 07
javiergs
PRO
0
550
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Grafana:建立系統全知視角的捷徑
blueswen
0
330
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
ThorVG Viewer In VS Code
nors
0
770
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
100
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
The untapped power of vector embeddings
frankvandijk
1
1.6k
GraphQLとの向き合い方2022年版
quramy
50
14k
The SEO identity crisis: Don't let AI make you average
varn
0
67
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
A Modern Web Designer's Workflow
chriscoyier
698
190k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
49
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
55
Typedesign – Prime Four
hannesfritz
42
2.9k
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