Skip to content

Commit 8926287

Browse files
committed
update docs on phoenix apps debugging
1 parent aa02b83 commit 8926287

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,17 @@ To debug Phoenix applications using ElixirLS, you can use the following launch c
179179
"name": "phx.server",
180180
"request": "launch",
181181
"task": "phx.server",
182-
"projectDir": "${workspaceRoot}"
182+
"projectDir": "${workspaceRoot}",
183+
"debugAutoInterpretAllModules": false,
184+
"debugInterpretModulesPatterns": ["MyApp*", "MyAppWeb*"],
185+
"exitAfterTaskReturns": false
183186
}
184187
```
185188

189+
In case of phoenix apps it is generally not advised to interpret all modules. Cowboy and ecto have known performance issues when run in interpreted mode. The example configuration disables auto interpreting and instead makes the DAP interpret only a subset of modules.
190+
191+
Note that `exitAfterTaskReturns` is set to `false`. Otherwise DAP session will end immediately after starting because mix task `phx.server` returns control to the caller.
192+
186193
Please make sure that `startApps` is not set to `true`. To clarify, `startApps` is a configuration option in the ElixirLS debug adapter. It controls whether or not to start the applications in the Mix project before running the task. In the case of Phoenix applications, setting `startApps` to `true` can interfere with the application's normal startup process and cause issues.
187194

188195
If you are running tests in the Phoenix application, you may need to set `startApps` to true. This will ensure that the necessary applications are started before the tests run.

0 commit comments

Comments
 (0)