Skip to content

Commit 3dffa58

Browse files
committed
Extend virtualenv section in README with folder detection info
The readme didn't reflect the changes from #121
1 parent 66560f0 commit 3dffa58

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,13 @@ The [Debugpy Wiki][debugpy_wiki] contains a list of all supported configuration
129129

130130
## Python dependencies and virtualenv
131131

132-
`nvim-dap-python` by default looks for `VIRTUAL_ENV` and `CONDA_PREFIX`
133-
environment variables and if present uses these environments to execute your
134-
application or tests.
132+
`nvim-dap-python` by default tries to detect a virtual environment and uses it
133+
when debugging your application. It looks for:
134+
135+
- The environment variables `VIRTUAL_ENV` and `CONDA_PREFIX`
136+
- The folders `venv`, `.venv`, `env`, `.env` relative to either the current
137+
working directory or the `root_dir` of a active language server client. See
138+
`:h lsp.txt` for more information about the latter.
135139

136140
If you're using another way to manage virtual environments, you can set a
137141
custom `resolve_python` function:
@@ -142,6 +146,10 @@ require('dap-python').resolve_python = function()
142146
end
143147
```
144148

149+
Or explicitly set the `pythonPath` property within your debugpy/nvim-dap
150+
configurations. See `:h dap-configuration` and [Launch/Attach
151+
Settings][debugpy_wiki]
152+
145153

146154
## Alternatives
147155

0 commit comments

Comments
 (0)