Debugger current working directory
Alighorab opened this issue · comments
I'm trying to debug a file inside a project with this layout and my neovim
working directory is .
. When I try to debug the file the working directory changes to the directory containing the file, so I get an error when I access a file with a relative path so to fix this I open the repl and change the directory using os.chdir("..")
, is there any way to make the debugger cwd
matches neovim cwd
? I tried setting cwd
in the configuration to ${workingDirectory}
and vim.fn.getcwd()
but it did not solve my issue.
.
├── project
│ └── somefile.py
├── poetry.lock
├── pyproject.toml
└── README.md
When I try to debug the file the working directory changes to the directory containing the file
nvim-dap or nvim-dap-python don't change the working directory and the working directory for the debug adapter defaults to the working directory of neovim. The working directory of the program to debug can be set via the cwd
option, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings
You could have a look at the logs to see what's actually sent.