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
Xdebugを使ってみる.pdf
Search
yo91245
October 18, 2019
Programming
46
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Xdebugを使ってみる.pdf
yo91245
October 18, 2019
Other Decks in Programming
See All in Programming
sbt 2.0: takeoff
eed3si9n
0
160
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
500
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
phperだってパンチカードでコーディングしたい
o0h
PRO
0
340
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
2
4.1k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Git: the NoSQL Database
bkeepers
PRO
433
67k
Making the Leap to Tech Lead
cromwellryan
135
10k
The SEO Collaboration Effect
kristinabergwall1
1
590
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Designing Experiences People Love
moore
143
24k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
Technical Leadership for Architectural Decision Making
baasie
3
600
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Transcript
Xdebugを使ってみる
PHPのデバッグってどうしてる • 変数をログファイルに出⼒ • var_dump()、dump()を使⽤ • exit;を使って処理を中断 ソースに記述するのが⾯倒… dumpしたものの想定した箇所が間違っている事も
Xdebugってこれが出来る • ブレイクポイントを指定しプログラムの⼀時停⽌ • 処理を⽌めておくことが可能 • プログラムをステップ実⾏ • 1⾏ずつ進めながら プログラムが⽌まった時点の変数が確認可能
導⼊ • Docker • Dockerfileに追記 • Vagrantなど • コマンド pecl
install xdebug インストール後はphp ‒vで確認可能 RUN pecl install xdebug \ && docker-php-ext-enable xdebug
導⼊ ・configファイル追加 php.iniに追加 • ホストIPアドレス • Dokcerなら” host.docker.internal”で取得できます。 xdebug.remote_enable=1 xdebug.remote_autostart=1
xdebug.remote_host=(ホスト側のIP) xdebug.remote_port=9001
導⼊ • VSCodeにPHP Debugを導⼊ • マーケットプレイスからダウ ンロード
注意 • var_dump()に拡張が⼊ります • デフォルト設定だと⻑い⽂字列が省略される 防ぐ場合以下記述をphpの設定ファイルに記述 xdebug.overload_var_dump = 0