-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: support buildDir
attribute in the Launch request
#2507
Comments
Please help me understand the uses cases better:
Do you have a reference to the discussion with vimspector? I am curious to understand why they always start the process from the workspace root only as opposed to what vscode-go does.
Do you have a specific client/use case in mind?
Is this so we can have a long-running debug adapter server that the same client can start once and direct all debug sessions to like in #2329)
"build the build directory and" - do you mean combining (because dlv's working directory, i.e. where dlv is launched, will be determined by the first launched request while the next launch request might use a target from a different location? |
Note: we ended up implementing I realized I didn't answer to Polina's question here
vimspector is a general dap client for all languages, not specialized for any particular language.
Anyone who starts dlv dap externally and needs to work with nested modules. The latest case was the google cloud code users who launches dlv process inside a prebuilt container.
Originally yes, but it seems like we are abandoning this plan for now.
My intention was to keep the |
Like
dlv debug
ordlv test
commands,dlv dap
builds the target program/testfrom the current directory where the dlv command is invoked.
There is
cwd
attribute in the launch argument, but that corresponds to--wd
flagand determines only the working directory of the target program.
We assumed the client can run
dlv dap
from the correct directory required for builduntil now. However, we recently heard of some cases where launching
dlv dap
fromthe right directory is not easy.
Currently building targets outside of the workspace, or outside of the main module isn't
possible.
dlv dap
process.
building the build directory and the dlv's process working directory isn't a good idea.
So, allow a new, optional attribute that specifies the build directory
(where
go build
command runs).cc @polinasok @suzmue
The text was updated successfully, but these errors were encountered: