Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Relativize source files passed to delve if possible #2908

Closed
wants to merge 5 commits into from

Conversation

arifogel
Copy link

@arifogel arifogel commented Nov 20, 2019


This change is Reviewable

- add 'sourceRoot' launch configuration property
- fixes failure to set breakpoint when binary is built with trim-paths,
e.g. via bazel
- possibly related to microsoft#1307
@msftclas
Copy link

msftclas commented Nov 20, 2019

CLA assistant check
All CLA requirements met.

@arifogel
Copy link
Author

Hmm. Breakpoint is getting hit, and variable inspection works. But there are some usability issues I need to clean up. WIll do over next couple days.

@arifogel
Copy link
Author

Seems to work now. Remote debugging is unaffected - so if it didn't work before, it still won't work now.

@tschundler
Copy link

I'm looking forward to this hopefully helping with my Bazel Go debugging.
Sounds like this may resolve #3011

@yalcinmelihyasin
Copy link

I have just briefly looked at the plugin code so I cannot say much but have you tested it with different OS? I remember there were some issues with path separators on different OS. See #3011 for detailed information.

@yalcinmelihyasin
Copy link

Also, I don't know if this would help with generated go code e.g. proto files. Although, even if it would not, it is a step towards right direction.

@ramya-rao-a
Copy link
Contributor

Hello all,

My apologies for the late response.

We have made some improvements in the way the path separators are used and mapped, but also realize the need to respect relative paths. We want to explore a few other alternatives before resorting to adding more fields/properties to the debug configuration as being done in this PR.

Please take a look at golang/vscode-go#45 where @quoctruong has shared the current state of things and potential improvements. There is a linked PR that you can check out as well. We would appreciate your input there.

As for this PR, we will have to close it as we are currently in the midst of a repo move, see We are moving section in our readme for more details. At the moment, we are not accepting any PR unless it is related to the move or critical bug fixes.

Thanks for your efforts here and we hope to see you engage in the discussion in golang/vscode-go#45

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

Successfully merging this pull request may close these issues.

6 participants