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
67
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
65
REST API Development
masnun
0
130
Golang For Scalable Systems
masnun
0
120
Email Validation using SMTP
masnun
0
81
Let's Get Going!
masnun
0
120
How to be Successful in Outsourcing
masnun
1
120
Other Decks in Programming
See All in Programming
Носок на сок
bo0om
0
960
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
230
プロフェッショナルとしての成長「問題の深掘り」が導く真のスキルアップ / issue-analysis-and-skill-up
minodriven
8
1.9k
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
180
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
6
1.4k
スモールスタートで始めるためのLambda×モノリス(Lambdalith)
akihisaikeda
2
320
AIコーディングエージェントを 「使いこなす」ための実践知と現在地 in ログラス / How to Use AI Coding Agent in Loglass
rkaga
4
1.1k
読書シェア会 vol.4 『ダイナミックリチーミング 第2版』
kotaro666
0
110
Bedrock×MCPで社内ブログ執筆文化を育てたい!
har1101
6
1.3k
Youtube Lofier - Chrome拡張開発
ninikoko
0
2.5k
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
1
250
GitHub Copilot for Azureを使い倒したい
ymd65536
1
290
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
69
4.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Practical Orchestrator
shlominoach
187
11k
The Invisible Side of Design
smashingmag
299
50k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
Scaling GitHub
holman
459
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.3k
Product Roadmaps are Hard
iamctodd
PRO
52
11k
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