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

debug: allow debugging outside GOPATH without a go.mod #2269

Merged
merged 1 commit into from
May 7, 2019

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented May 5, 2019

Do not try to determine the package name being debugged. Delve supports
debugging and testing without specifying a package name; vim-go should,
too. One of the things that this makes easier is debugging code that is
neither in GOPATH nor in a module.

Remove unnecessary is_test key from the state dictionary.

Remove code that set the current directory when debugging tests. Because
delve is started as an async job, its cwd will be set to the directory
of the buffer from which debugging is started, anyway. Using lcd to
set the buffer local directory is just another thing to keep track of
and it doesn't seem to have any real benefit.

Update documentation to explain how relative paths work for :GoDebug
and :GoDebugTest.

Refactor go#package#FromPath so that it returns -2 when the package is
neither in GOPATH nor in the current module.

Do not try to determine the package name being debugged. Delve supports
debugging and testing without specifying a package name; vim-go should,
too. One of the things that this makes easier is debugging code that is
neither in GOPATH nor in a module.

Remove unnecessary is_test key from the state dictionary.

Remove code that set the current directory when debugging tests. Because
delve is started as an async job, its cwd will be set to the directory
of the buffer from which debugging is started, anyway. Using `lcd` to
set the buffer local directory is just another thing to keep track of
and it doesn't seem to have any real benefit.

Update documentation to explain how relative paths work for `:GoDebug`
and `:GoDebugTest`.

Refactor go#package#FromPath so that it returns -2 when the package is
neither in GOPATH nor in the current module.
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 this pull request may close these issues.

1 participant