Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
めざせ ブレークポイントマスター
Search
y-tsuzaki
March 09, 2021
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
めざせ ブレークポイントマスター
PHPカンファレンス2020にてLTした際の資料です。
PhpStormにてPHPのXDebugのブレークポイントを使ったデバッグのやり方について紹介しています。
y-tsuzaki
March 09, 2021
More Decks by y-tsuzaki
See All by y-tsuzaki
PHPカンファレンス福岡2024 【超特急】SQLアンチパターン総おさらいLT
ytsuzaki
1
1.7k
PHPカンファレンス北海道2024 リーダブルSQL
ytsuzaki
5
870
ある日PHPerがベンチャー企業のデータ基盤を作ることになったら
ytsuzaki
1
470
【PhpStorm】モブプログラミングの実践と学び【結局はバランス?】
ytsuzaki
0
570
PHPerKaigi 2022 【Laravel】 サクッとN + 1問題を見つけて倒しチャオ!
ytsuzaki
1
3.3k
【超特急】「SQLアンチパターン」 総おさらいLT 【4分で25個】
ytsuzaki
2
930
Nuxt Composition API 使ってみた
ytsuzaki
0
300
Nuxt.js x Composition API x TypeScript
ytsuzaki
0
840
PHPerKaigi 2021 LT PHPで簡単コード生成! 同じようなコードをたくさん書くなら コード生成しチャイナ!
ytsuzaki
0
180
Other Decks in Programming
See All in Programming
APNsからLive Activityを開始する話
yumnumm
0
150
Heart of Swift Concurrency
koher
0
1.2k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
440
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
480
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
440
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
620
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
140
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
phperだってパンチカードでコーディングしたい
o0h
PRO
0
210
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
620
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
A designer walks into a library…
pauljervisheath
211
25k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Code Reviewing Like a Champion
maltzj
528
40k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
720
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Transcript
None
自己紹介 名前:つざき (Twitter @820zacky) PHPer歴:1.5年 所属: 仕事:
ブレークポイントを使ってデ バッグをしたこと ありますか?
Discordで アンケートを取ってみました (ご協力ありがとうございました)
※PHPCon参加者にアンケート(33人が回答)
※PHPCon参加者にアンケート(33人が回答)
※DiscordにてPHPCon参加者にアンケート(33人が回答) 「使ったことがない」 「ほとんど使わない」 が50%以上
意外と使ったことない人が多く て安心しました(笑)
僕も正直 2、3回しか 使ったことないです
私 なりたい
PhpStormについての話です それ以外のIDEの人は すみません
ブレークポイントってなに?
ブレークポイントってなに? - デバッグ作業においてプログラムの実行を一時停止させる箇所のこと
今までの処理の流れ ⬆ ⬆ 変数の中身 (実行中に書き換え可能) ⬇コードをー行ずつ実行したりできる
ブレークポイント 3種類もあるよ
1. 行ブレークポイント - 行に設定するブレークポイント
2. メソッドブレークポイント - メソッドの一行目で止まるブレークポイント
3. 例外ブレークポイント - 例外クラス名を指定する - ⚡マークが目印
便利そうなオプション
ブレークポイントのオプションを表示する方法 - ブレークポイントを右クリックすればOK - 他の方法もある
1. 条件 (Condition) - 条件式に一致するときだけブレークポイントが有効になる - 何度も実行される処理において、特定のときだけ停止したい時に便利そう
2. ログ (Log) - 任意のメッセージをコンソール上に表示できる - ブレークポイントの位置、スタックトレースも出せる - 便利そう
3. 中断 (Suspend execution) - オフにすると、プログラムの実行を一時停止しなくなる - ログ機能との組み合わせで使うと良さそう
他にも便利そうなオプションがあるが割愛 - 使用可能 (Enabled) - 一度ヒットしたら除去する ( Remove once hit
) - 次のブレークポイントに到達するまで無効にする (Disable until hitting the following breakpoint)
1. 使用可能 (Enabled) - ブレークポイントは消さないまま、ブレークポイントを無効化できる - これは普通に使いそう
一度ヒットしたら除去する( Remove once hit ) - 一度ヒットしたら無効化されます - 一回だけ止めたい時使うと良さそう(そのまま)
次のブレークポイントに到達するまで無効にする - 指定したブレークポイントがヒットしたら、有効化されるブレークポイント’ - 複雑なデバッグをするときは使うと便利かもしれない
まとめ - ブレークポイント便利! - 意外といろんなオプションがある! - 全部PhpStormの公式ドキュメントに書いてます! https://pleiades.io/help/phpstorm/using-breakpoints.html
None