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
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
69
REST API Development
masnun
0
160
Golang For Scalable Systems
masnun
0
130
Email Validation using SMTP
masnun
0
86
Let's Get Going!
masnun
0
130
How to be Successful in Outsourcing
masnun
1
130
Other Decks in Programming
See All in Programming
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
930
Devoxx BE - Local Development in the AI Era
kdubois
0
130
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
850
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
1.3k
ALL CODE BASE ARE BELONG TO STUDY
uzulla
25
6.2k
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
1
630
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1.1k
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
品質ワークショップをやってみた
nealle
0
500
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.8k
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
170
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
1k
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
35
6.1k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
980
Fireside Chat
paigeccino
40
3.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Docker and Python
trallard
46
3.6k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
RailsConf 2023
tenderlove
30
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