You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
env= {}, -- for example {XDEBUG_CONFIG = 'idekey=neotest'}
73
+
dap=nil, -- to configure `dap` strategy put single element from `dap.configurations.php`
72
74
}),
73
75
}
74
76
```
@@ -105,6 +107,16 @@ require("neotest-phpunit")({
105
107
})
106
108
```
107
109
110
+
If there are projects you don't want discovered, you can instead set `root_ignore_files` to ignore any matching projects.
111
+
112
+
For example, if your project uses Pest and the appropriate [neotest adapter](https://github.com/V13Axel/neotest-pest), you'll need to set:
113
+
114
+
```lua
115
+
require("neotest-phpunit")({
116
+
root_ignore_files= { "tests/Pest.php" }
117
+
})
118
+
```
119
+
108
120
### Filtering directories
109
121
110
122
By default, the adapter will search test files in all dirs in the root with the exception of `node_modules` and `.git`. You can change this with:
@@ -123,6 +135,50 @@ require("neotest-phpunit")({
123
135
})
124
136
```
125
137
138
+
### Debugging with `dap` strategy
139
+
140
+
You need to install and configure [nvim-dap](https://github.com/mfussenegger/nvim-dap) with [vscode-php-debug](https://github.com/xdebug/vscode-php-debug) first. For example if you have
141
+
```lua
142
+
dap.configurations.php= {
143
+
{
144
+
log=true,
145
+
type="php",
146
+
request="launch",
147
+
name="Listen for XDebug",
148
+
port=9003,
149
+
stopOnEntry=false,
150
+
xdebugSettings= {
151
+
max_children=512,
152
+
max_data=1024,
153
+
max_depth=4,
154
+
},
155
+
breakpoints= {
156
+
exception= {
157
+
Notice=false,
158
+
Warning=false,
159
+
Error=false,
160
+
Exception=false,
161
+
["*"] =false,
162
+
},
163
+
},
164
+
}
165
+
}
166
+
```
167
+
you can set
168
+
```lua
169
+
require("neotest-phpunit")({
170
+
env= {
171
+
XDEBUG_CONFIG="idekey=neotest",
172
+
},
173
+
dap=dap.configurations.php[1],
174
+
})
175
+
```
176
+
177
+
If you run a test with `dap` strategy from the summary window (by default by `d`) and see that window content replaced by debugged buffer content then consider setting `dap.defaults.fallback.switchbuf` or Neovim level [`switchbuf`](https://neovim.io/doc/user/options.html#'switchbuf'), f.e.
0 commit comments