VScodeでコンテナにアタッチはしていると思います。以下、その前提で説明しますが、
- VScodeでデバッグ対象のPHPスクリプトを開く
- ブレークポイントを設定する
- VScodeで【Launch currently open script】を開始
でできると思います。
コメントを受けて追記(2023/9/28 17:52)
参考のため、手元のlaunch.jsonの該当箇所を引用します。
json
1{
2 // Use IntelliSense to learn about possible attributes.
3 // Hover to view descriptions of existing attributes.
4 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 "version": "0.2.0",
6 "configurations": [
7 {
8 "name": "Listen for Xdebug",
9 "type": "php",
10 "request": "launch",
11 "port": 9003
12 },
13 {
14 "name": "Launch currently open script",
15 "type": "php",
16 "request": "launch",
17 "program": "${file}",
18 "cwd": "${fileDirname}",
19 "port": 0,
20 "runtimeArgs": [
21 "-dxdebug.start_with_request=yes"
22 ],
23 "env": {
24 "XDEBUG_MODE": "debug,develop",
25 "XDEBUG_CONFIG": "client_port=${port}"
26 }
27 },
28以下略
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2023/09/28 06:28
2023/09/29 01:34
2023/09/29 02:10
2023/09/29 02:47
2023/10/01 02:11