Skip to content
New issue

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

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

Already on GitHub? # to your account

debug: allow to configure substitutePath for debug test codelens and symlinks #1467

Closed
hyangah opened this issue May 4, 2021 · 3 comments
Closed
Assignees
Labels
Debug Issues related to the debugging functionality of the extension. FeatureRequest FrozenDueToAge

Comments

@hyangah
Copy link
Contributor

hyangah commented May 4, 2021

Users who work in symlinked workspace need to use substitutePath (introduced as a fix for #622) because VSCode may use the symlinked path
while the Go command and Delve would use the original path.

This solution is not available for debug sessions started with the debug test codelens or
the debug session that started with a default configuration without launch.json (see #855)

A couple of options:

  • allow users to configure the default substitutePath settings (e.g. go.delveConfig ) in settings.json
  • try to detect this symlink case and auto-populate substitutePath automatically.
  • when this case is detected, the extension pops up a message to ask the user to configure the setting (or even update the settings value on behalf of the users).
@hyangah hyangah added the Debug Issues related to the debugging functionality of the extension. label May 4, 2021
@gopherbot gopherbot added this to the Untriaged milestone May 4, 2021
@hyangah hyangah modified the milestones: Untriaged, Backlog May 4, 2021
@suzmue suzmue self-assigned this May 10, 2021
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/318589 mentions this issue: src/goDebugConfiguration.ts: add substitutePath to go.delveConfig

gopherbot pushed a commit that referenced this issue May 12, 2021
Allow users to configure substitutePath from settings.json so that
the setting can be applied to codelenses.

Updates #1467

Change-Id: I504d91e60f5b1a8c79369ad933b79247caa371ac
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/318589
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@hyangah
Copy link
Contributor Author

hyangah commented Sep 21, 2021

Since v0.26.0, substitutePath can be set using go.delveConfig in settings.json.
@suzmue Do you want to keep looking into this problem (e.g. auto-generate substitutePath mapping, or provide a way for users to inspect the file path info embedded in the debugged binary and configure the mappings on the fly, ...)? I think it's ok to close this issue, and open separate issues to investigate alternative options to improve UX. What do you think?

@suzmue
Copy link
Contributor

suzmue commented Sep 22, 2021

Closing this since this particular issue is resolved. We can open separate issues for follow up features.

@suzmue suzmue closed this as completed Sep 22, 2021
@golang golang locked and limited conversation to collaborators Sep 22, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Debug Issues related to the debugging functionality of the extension. FeatureRequest FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants