Skip to content

Commit 84e89ad

Browse files
committed
Clarify program/module diff in readme under custom configuration
1 parent 261ce64 commit 84e89ad

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,25 +148,33 @@ vnoremap <silent> <leader>ds <ESC>:lua require('dap-python').debug_selection()<C
148148

149149
## Custom configuration
150150

151-
If you call the `require('dap-python').setup` method it will create a few
152-
`nvim-dap` configuration entries. These configurations are general purpose
153-
configurations suitable for many use cases, but you may need to customize the
154-
configurations - for example if you want to use Docker containers.
151+
If you call the `require('dap-python').setup` method it will create a
152+
few `nvim-dap` configuration entries. These configurations are general
153+
purpose configurations suitable for many use cases, but you may need to
154+
add additional configurations or customize them.
155155

156-
To add your own entries you can create per project `.vscode/launch.json`
157-
configuration files. See `:help dap-launch.json`.
156+
To add additional configurations you can create per project
157+
`.vscode/launch.json` configuration files. See `:help dap-launch.json`.
158158

159159
Or you can add your own global entries by extending the
160160
`dap.configurations.python` list after calling the `setup` function:
161161

162162
```lua
163-
require('dap-python').setup('/path/to/python')
163+
require('dap-python').setup('debugpy-adapter') -- or uv, or path to python, see #usage
164164
table.insert(require('dap').configurations.python, {
165165
type = 'python',
166166
request = 'launch',
167167
name = 'My custom launch configuration',
168+
169+
-- `program` is what you'd use in `python <program>` in a shell
170+
-- If you need to run the equivalent of `python -m <module>`, replace
171+
-- `program = '${file}` entry with `module = "modulename"
168172
program = '${file}',
169-
-- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings
173+
174+
console = "integratedTerminal",
175+
176+
-- Other options:
177+
-- See https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings
170178
})
171179
```
172180

0 commit comments

Comments
 (0)