質問するログイン新規登録

回答編集履歴

1

コメントに回答する内容を追記しました

2023/09/28 08:53

投稿

ockeghem
ockeghem

スコア11710

answer CHANGED
@@ -5,3 +5,39 @@
5
5
  - VScodeで【Launch currently open script】を開始
6
6
 
7
7
  でできると思います。
8
+
9
+ ---
10
+ コメントを受けて追記(2023/9/28 17:52)
11
+
12
+ 参考のため、手元のlaunch.jsonの該当箇所を引用します。
13
+ ```json
14
+ {
15
+ // Use IntelliSense to learn about possible attributes.
16
+ // Hover to view descriptions of existing attributes.
17
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
18
+ "version": "0.2.0",
19
+ "configurations": [
20
+ {
21
+ "name": "Listen for Xdebug",
22
+ "type": "php",
23
+ "request": "launch",
24
+ "port": 9003
25
+ },
26
+ {
27
+ "name": "Launch currently open script",
28
+ "type": "php",
29
+ "request": "launch",
30
+ "program": "${file}",
31
+ "cwd": "${fileDirname}",
32
+ "port": 0,
33
+ "runtimeArgs": [
34
+ "-dxdebug.start_with_request=yes"
35
+ ],
36
+ "env": {
37
+ "XDEBUG_MODE": "debug,develop",
38
+ "XDEBUG_CONFIG": "client_port=${port}"
39
+ }
40
+ },
41
+ 以下略
42
+ ```
43
+