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
180
Golang For Scalable Systems
masnun
0
160
Email Validation using SMTP
masnun
0
92
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に書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
780
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
520
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
210
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
700
OSもどきOS
arkw
0
480
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
560
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
100
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
200
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
120
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
RTSPクライアントを自作してみた話
simotin13
0
520
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.4k
Why Our Code Smells
bkeepers
PRO
340
58k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
230
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
160
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
A better future with KSS
kneath
240
18k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Accessibility Awareness
sabderemane
1
140
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
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