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
79
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Power Debugging & Profiling Your PHP Apps
Abu Ashraf Masnun
January 12, 2023
More Decks by Abu Ashraf Masnun
See All by Abu Ashraf Masnun
Background Task Processing in Celery
masnun
1
80
REST API Development
masnun
0
190
Golang For Scalable Systems
masnun
0
160
Email Validation using SMTP
masnun
0
93
Let's Get Going!
masnun
0
130
How to be Successful in Outsourcing
masnun
1
130
Other Decks in Programming
See All in Programming
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
620
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
780
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
620
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
810
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
330
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
240
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
7.2k
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
180
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
150
Lessons from Spec-Driven Development
simas
PRO
0
240
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
270
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
230
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
410
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Navigating Weather and Climate Data
rabernat
0
260
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
250
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Believing is Seeing
oripsolob
1
160
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Prompt Engineering for Job Search
mfonobong
0
360
Building AI with AI
inesmontani
PRO
1
1.1k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
400
Discover your Explorer Soul
emna__ayadi
2
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