Skip to content

Commit baae8df

Browse files
committed
docs: update README.md
1 parent bbd79d9 commit baae8df

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ require("neotest-phpunit")({
107107
})
108108
```
109109

110-
If there are projects you don't want discovered, you can instead set `root_ignore_files` to ignore any matching projects.
110+
If there are projects you don't want discovered, you can instead set `root_ignore_files` to ignore any matching projects.
111111

112112
For example, if your project uses Pest and the appropriate [neotest adapter](https://github.com/V13Axel/neotest-pest), you'll need to set:
113113

@@ -135,9 +135,12 @@ require("neotest-phpunit")({
135135
})
136136
```
137137

138-
### Debugging with `dap` strategy
138+
### Debugging
139+
140+
The plugin can also be used for debugging via a dap strategy.
141+
142+
Firstly, install and configure [nvim-dap](https://github.com/mfussenegger/nvim-dap) with [vscode-php-debug](https://github.com/xdebug/vscode-php-debug). Then set the following dap configuration:
139143

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
141144
```lua
142145
dap.configurations.php = {
143146
{
@@ -164,7 +167,9 @@ dap.configurations.php = {
164167
}
165168
}
166169
```
167-
you can set
170+
171+
Then in the plugin's config, add:
172+
168173
```lua
169174
require("neotest-phpunit")({
170175
env = {
@@ -174,10 +179,8 @@ require("neotest-phpunit")({
174179
})
175180
```
176181

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.
178-
```lua
179-
dap.defaults.fallback.switchbuf = "useopen"
180-
```
182+
> [!NOTE]
183+
> If you run a test with the `dap` strategy from the summary window (by default by `d`) and see that the window content has been replaced by debugger content then consider setting `dap.defaults.fallback.switchbuf = "useopen"` or Neovim level [`switchbuf`](https://neovim.io/doc/user/options.html#'switchbuf')
181184
182185
## :rocket: Usage
183186

0 commit comments

Comments
 (0)