Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dap-python, how to set cwd for debugpy when debugging a script #413

Open
lccambiaghi opened this issue Nov 26, 2020 · 5 comments · May be fixed by #414
Open

dap-python, how to set cwd for debugpy when debugging a script #413

lccambiaghi opened this issue Nov 26, 2020 · 5 comments · May be fixed by #414

Comments

@lccambiaghi
Copy link

As title! I tried to set :cwd arg in my template but it gets ignored.

@nbfalcon
Copy link
Member

Works for me, although I suspect what might be your issue: :cwd isn't expanded. Is your :cwd an absolute path?

nbfalcon added a commit that referenced this issue Nov 26, 2020
In a previous commit, :cwd was expanded specifically in `dap-chrome'. Undo that,
and centralize expanding :cwd in `dap-start-debugging-noexpand'. This allows
:cwd to be a relative path.

Fixes #413.
@nbfalcon nbfalcon linked a pull request Nov 26, 2020 that will close this issue
@nbfalcon
Copy link
Member

Try using my PR branch, everything should work.

@lccambiaghi
Copy link
Author

You are the best, always available to help! I am actually trying to set the cwd in a dynamic way.. In my ptvsd templates I had

...
:cwd (lsp-workspace-root)
...

which is what I tried.. it would be ideal not to have to paste the path every time I change target module/project.

@nbfalcon
Copy link
Member

:cwd "${workspaceFolder}"

@nbfalcon
Copy link
Member

All launch.json variables work with dap-register-debug-template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants