Skip to content

Commit da7a534

Browse files
authored
Update debugger section in readme
Closes elixir-editors#366 Closes elixir-editors#383
1 parent 99b6d78 commit da7a534

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,44 @@ In order to debug modules in `.exs` files (such as tests), they must be specifie
117117
}
118118
```
119119

120+
In order to debug a single test or a single test file it is currently necessary to modify `taskArgs` and make sure no other tests are requred in `requireFiles`.
121+
122+
```
123+
{
124+
"type": "mix_task",
125+
"name": "mix test",
126+
"request": "launch",
127+
"task": "test",
128+
"taskArgs": ["tests/some_test.exs:123"],
129+
"projectDir": "${workspaceRoot}",
130+
"requireFiles": [
131+
"test/**/test_helper.exs",
132+
"test/some_test.exs"
133+
]
134+
}
135+
```
136+
137+
Please note that due to `:int` limitation NIF modules cannot be interpreted and need to be excluded via `excludeModules` option. This option can be also used to disable interpreting for some modules when it is not desirable e.g. when performance is not satisfactory.
138+
139+
```
140+
{
141+
"type": "mix_task",
142+
"name": "mix test",
143+
"request": "launch",
144+
"task": "test",
145+
"taskArgs": ["--trace"],
146+
"projectDir": "${workspaceRoot}",
147+
"requireFiles": [
148+
"test/**/test_helper.exs",
149+
"test/**/*_test.exs"
150+
],
151+
"excludeModules": [
152+
":some_nif",
153+
"Some.SlowModule"
154+
]
155+
}
156+
```
157+
120158
## Automatic builds and error reporting
121159

122160
Builds are performed automatically when files are saved. If you want this to happen automatically when you type, you can turn on "autosave" in your IDE.

0 commit comments

Comments
 (0)